Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: File::Find preprocess and sort issues

by jwkrahn (Abbot)
on Jul 24, 2009 at 14:52 UTC ( [id://783004]=note: print w/replies, xml ) Need Help??


in reply to File::Find preprocess and sort issues

sort them based on creation time.

...

map { [ stat("$sp_dir/$_")->ctime, $_] }

ctime is NOT the creation time of a file.   On Unix and Linix file systems the creation time of the file is NOT stored anywhere.

As the stat function says:

                10 ctime    inode change time in seconds since the epoch (*)

               (*) Not all fields are supported on all filesystem types. Notably, the ctime field is non-portable.  In particular, you cannot expect it to be a "creation time", see "Files and Filesystems" in perlport for details.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://783004]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-04-23 11:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found