Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

•Re^4: Finding oldest file in directory

by merlyn (Sage)
on Oct 19, 2004 at 13:22 UTC ( [id://400510]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Finding oldest file in directory
in thread Finding oldest file in directory

Yes, I was talking about builtin Perl sort vs a Perl-coded high-water mark. Your List::Util's max doesn't apply in the referenced case (largest file), because max can't be coaxed to doing an indirection, so you'd need a GRT style translation, or else you're back to open coding it, again.

The point here is that high-water-mark is one strategy, and sorting is another strategy, with different costs depending on the length. The only real takeaway here is Benchmark will know, because you can't always guess.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on •Re^4: Finding oldest file in directory

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://400510]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-26 05:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found