in reply to Finding oldest file in directory
Why sort at all?
The problem is to find the oldest file, that's it.
just walk the list of files, and compare every one to the 'currently newest', this would be the most efficient solution.
I'm shocked that people actually suggested Shwartzian Transform and similiarly overgrown solutions to such simple problem.
|
---|
Replies are listed 'Best First'. | |
---|---|
•Re^2: Finding oldest file in directory
by merlyn (Sage) on Oct 19, 2004 at 13:04 UTC | |
by theorbtwo (Prior) on Oct 19, 2004 at 13:16 UTC | |
by merlyn (Sage) on Oct 19, 2004 at 13:22 UTC |
In Section
Seekers of Perl Wisdom