File::stat

File::stat

NAME

File::stat - by-name interface to Perl's built-in stat() functions

SYNOPSIS

use File::stat;
$st = stat($file) or die "No $file: $!";
if ( ($st->mode & 0111) && $st->nlink > 1) ) {
    print "$file is executable with lotsa links\n";
} 

if ( -x $st ) {
    print "$file is executable\n";
}

use Fcntl "S_IRUSR";
if ( $st->cando(S_IRUSR, 1) ) {
    print "My effective uid can read $file\n";
}

use File::stat qw(:FIELDS);
stat($file) or die "No $file: $!";
if ( ($st_mode & 0111) && ($st_nlink > 1) ) {
    p