in reply to Re^3: File::stats issue
in thread File::stats issue

but on the documentation i could find on File::stat, it says that it overrides the functionality of the built in stat(), and gives just ONE example with 1 piece of code that suposedly works with the file mode.... i've not found the man/doc for File::stat very helpful, not does it give a detail of the fields it works with, or in what format are those, hence my problems...

Replies are listed 'Best First'.
Re^5: File::stats issue
by moot (Chaplain) on Mar 14, 2005 at 20:45 UTC
    Yes, but 'overrides' != 'repeats'.

    From File::stat:

    This module's default exports override the core stat() and lstat() functions, replacing them with versions that return "File::stat" objects. ... You may also import all the structure fields directly into your namespace as regular variables using the :FIELDS import tag. (Note that this still overrides your stat() and lstat() functions.)
    and from stat:
    stat Returns a 13-element list giving the status info for a file, either the file opened via FILEHANDLE, or named by EXPR.
    I think the key word there is 'replace'. Nowhere in File::stat does it say that it returns a 13 element list indentical to stat.

    You'll also want to familiarise yourself with the C library stat() function, since that is from where the field names are drawn.