Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- PERL 4.0 Reference Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

     stat(FILEHANDLE)

     stat FILEHANDLE

     stat(EXPR)

     stat SCALARVARIABLE

             Returns a 13-element array giving the statistics for
             a  file,  either  the file opened via FILEHANDLE, or
             named by EXPR.  Typically used as follows:

                 ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
                    $atime,$mtime,$ctime,$blksize,$blocks)
                        = stat($filename);

             If stat is passed the special filehandle  consisting
             of  an  underline,  no stat is done, but the current
             contents of the stat structure from the last stat or
             filetest are returned.  (Note that on MS-DOS several
             of these values are spurious.) Example:

                  if (-x $file && (($d) = stat(_)) && $d < 0) {
                       print "$file is executable NFS file\n";
                  }

             (This only works on machines for  which  the  device
             number is negative under NFS.)

See Also: lstat

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson