|
|
| laziness, impatience, and hubris | |
| PerlMonks |
Re: Finding oldest file in directoryby ikegami (Pope) |
| on Oct 18, 2004 at 21:08 UTC ( #400321=note: print w/ replies, xml ) | Need Help?? |
|
You mentioned portability was a requirement, so you should use File::Spec to build paths. "/" is not the file seperator on Macs, for example. I have a script that needs to determine the oldest file in a particular directory If all you're concerned about is which file is the oldest, there's no need to sort:
I don't know how efficient glob is. You can get rid of it:
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||