Perl6-Doc
view release on metacpan or search on metacpan
share/Synopsis/S29-functions.pod view on Meta::CPAN
=head3 Numeric
See L<S32-setting-library/Numeric>.
=head3 IO
The following functions can now be found in or replaced by something in the IO
modules.
accept, bind, binmode, chdir, chmod, chown, close, closedir, connect
eof, fcntl, fileno, flock, getc, getsockname, getsockopt, glob, ioctl, link, listen
lstat, mkdir, open, opendir, pipe, print, printf, read, readdir, readline, readlink
readpipe, recv, rename, rewinddir, rmdir, say, seek, seekdir, select, send, setsockopt
shutdown, socket, socketpair, stat, symlink, sysopen, sysread, sysseek
syswrite, tell, telldir, truncate, umask, unlink
=head3 Temporal
The following functions can now be found in or replaced by something in the Temporal
modules.
share/Synopsis/S32-setting-library/IO.pod view on Meta::CPAN
=back
=head1 OS-specific classes
=head2 Unix
=head2 Path::Unix
=over
=item chown
multi chown ($uid = -1, $gid = -1, *@files --> Int)
Changes the owner (and group) of a list of files. The first
two elements of the list must be the numeric uid and gid, in
that order. A value of -1 in either position is interpreted by
most systems to leave that value unchanged. Returns the number
of files successfully changed.
$count = chown $uid, $gid, 'foo', 'bar';
chown $uid, $gid, @filenames;
On systems that support C<fchown>, you might pass file handles
among the files. On systems that don't support C<fchown>, passing
file handles produces a fatal error at run time.
Here's an example that looks up nonnumeric uids in the passwd
file:
$user = prompt "User: ";
$pattern = prompt "Files: ";
($login,$pass,$uid,$gid) = getpwnam($user)
or die "$user not in passwd file";
@ary = glob($pattern); # expand filenames
chown $uid, $gid, @ary;
On most systems, you are not allowed to change the ownership of
the file unless you're the superuser, although you should be
able to change the group to any of your secondary groups. On
insecure systems, these restrictions may be relaxed, but this
is not a portable assumption. On POSIX systems, you can detect
this condition this way:
use POSIX qw(sysconf _PC_CHOWN_RESTRICTED);
$can-chown-giveaway = not sysconf(_PC_CHOWN_RESTRICTED);
=item chmod LIST
X<chmod> X<permission> X<mode>
Changes the permissions of a list of files. The first element of the
list must be the numerical mode, which should probably be an octal
number, and which definitely should I<not> be a string of octal digits:
C<0o644> is okay, C<0644> is not. Returns the number of files
successfully changed.
share/table_index.pod view on Meta::CPAN
=back
=head2 C<<< chop >>>
=over
=item (string method) - returns a string with the last character removed
=back
=head2 C<<< chown >>>
=over
=item - changes owner of files
=back
=head2 C<<< circumfix >>>
=over
( run in 0.709 second using v1.01-cache-2.11-cpan-5511b514fd6 )