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

Re: grab newest file

by shmem (Chancellor)
on Jul 07, 2006 at 06:15 UTC ( [id://559718]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $report = (sort{-M $a <=> -M $b}<*>)[0];
    
  2. or download this
    $report = (
      map { $_->[1] } sort { $a->[0] <=> $b->[0] }
         map { [-M $_, $_] } <*>)[0]
    );
    
  3. or download this
    $report = do {
        local *D;
    ...
        closedir(D);
        $ret;
    } ;
    
  4. or download this
    Benchmark: timing 1000 iterations of do, golf, st...
            do:  8 wallclock secs ( 4.00 usr +  4.21 sys =  8.21 CPU) @ 12
    +1.80/s (n=1000)
    ...
    golf 13.7/s   -- -55% -89%
    st   30.3/s 122%   -- -75%
    do    122/s 792% 302%   --
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-04-19 15:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found