You can get mtime as the tenth element of the list returned by stat. Here's a quick way to do it,
my @files_by_mtime = map {$_->[0]} sort {$a->[1] <=> $b->[1]} map {[$_,(stat)[9]]} glob "$dir/*";
After Compline,
Zaxo
In reply to Re: How to list files in dir with respect to time ?
by Zaxo
in thread How to list files in dir with respect to time ?
by swaroop
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |