Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

•Re^4: Finding oldest file in directory

by merlyn (Sage)
on Oct 19, 2004 at 13:22 UTC ( #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
Node Status?
node history
Node Type: note [id://400510]
help
Chatterbox?
[hippo]: Make it an option?
[Corion]: hippo: Yes, but I'm not sure that it's even worth the effort of implementing it at all...
[Corion]: You'll only ever need that option if you have a long-running query whose results are not cached by your DB already, and in those cases I presume that the programmer will want to maintain the temporary tables themselves - I wouldn't know when to drop ...
[Corion]: ... the temporary tables, and also don't have a good idea on how to create unique table names for them
[hippo]: OIC. In that case leave it out but invite feature requests and see if any of the users suggest it. :-)

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2017-02-23 15:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (347 votes). Check out past polls.