Something like this perhaps...
opendir(ROOT, $dir) || die "$!\n"; foreach (sort { -M $b <=> -M $a } readdir(ROOT) ) { print "$_\n"; }
Update: snax below quite rightly points out a bug in this code.
--
"Perl makes the fun jobs fun
and the boring jobs bearable" - me
In reply to Re: File list by date
by davorg
in thread File list by date
by rasmus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |