nimfa has asked for the wisdom of the Perl Monks concerning the following question:

Hello! how do i get information on a file like owner,attribute , date, last modif ,and size. thnks!

Replies are listed 'Best First'.
Re: getting file info?
by Fastolfe (Vicar) on Nov 28, 2001 at 01:28 UTC
Re: getting file info?
by Dogma (Pilgrim) on Nov 28, 2001 at 02:31 UTC
    On most unix systems you can access the perldocs through either man or the perldoc command. To answer your question directly try "perldoc -f stat". You really should have a look at perls included documentation. To get started try "perldoc perl" to get a list of documentation sections.
Re: getting file info?
by IlyaM (Parson) on Nov 28, 2001 at 05:40 UTC
    Also check module File::stat. It replaces core function stat so it provides more nice interface.

    Compare these examples:

    my $mode = (stat($file))[2];

    and

    use File::stat; my $mode = stat($file)->mode;

    Second variant IMHO is much more readable.

A reply falls below the community's threshold of quality. You may see it by logging in.