http://qs321.pair.com?node_id=283452

Smaug has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,
I'm trying to get the newest file in a Win32 directory. I have done it as follows:
@list=(`dir *.log \/B \/OD`); $count = scalar(@list); $newest = $list[$#count]; print "$newest \n";
Although this works, I am sure that there is a better way of doing this?!?
Also, is there a module I should know about for these sorts of things??

Thanks,
Smaug.