in reply to
READDIR - Sort by Time?
my @dirfiles = sort { -M $a <=> -M $b } grep !/^\.\.?$/, readdir ORDERS;
should work, I guess. Don't forget to prepend $a and $b with the directory path you opened (if you're not working in ./).
--twerq
Update:
Aristotle
's solution is better. :)
Comment on
Re: READDIR - Sort by Time?
Download
Code
In Section
Seekers of Perl Wisdom