in reply to stat and File::stat question for $mode

stat is a built-in function. File::stat overrides it to return an object instead of the list of 13 elements. Decide on which one you want to use, and read the respective documentation. The documentation for stat will not help you if you're using File::stat.

  • Comment on Re: stat and File::stat question for $mode

Replies are listed 'Best First'.
Re^2: stat and File::stat question for $mode
by eacWash (Initiate) on Nov 20, 2011 at 23:54 UTC
    Thanks, I had one book open to stat with the 13 elements in an array and another describing the module File::stat.
    #!/usr/bin/perl use File::stat; $statTry=stat("testStat"); printf("The value for stat is => %04o\n ", $statTry->mode&0777 ); print("\n");