Or you could use File::stat:
use File::stat; $st = stat($file) or die "No $file: $!"; my $mode = $st->mode; my $uid = $st->uid; my $gid = $st->gid;
A few more lines (or not, if you just use $st->field directly), but the extra typing makes up in clarity and not having to do a perldoc -f stat to figure out where each attribute is in the results.
-b
In reply to Re^2: Perl cp -p?
by bgreenlee
in thread Perl cp -p?
by DrWhy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |