Can anyone tell me how to sort the list of files on the basis of creation time and date of file?
Sorting files
Collapse
X
-
Hi Sada,
All you need is the following functions:
perldoc stat
perldoc -X
perldoc sort
[CODE=perl]
my @sorted = sort {(stat($a))[9] <=> (stat($b))[9]} @files;
[/CODE]
- Miller -
Originally posted by sadanandCan anyone tell me how to sort the list of files on the basis of creation time and date of file?
Miller has posted the functions you can use to do this, but what do you mean by:
"creation time and date of file"
what is "date of file"?Comment
-
Hi Kevin,Originally posted by KevinADCMiller has posted the functions you can use to do this, but what do you mean by:
"creation time and date of file"
what is "date of file"?
what is "date of file"?
---->The date and the time when the file was created.
Regards,
SadanandComment
Comment