Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: epoch reduction

by Not_a_Number (Parson)
on Apr 19, 2012 at 20:00 UTC ( #966037=note: print w/ replies, xml ) Need Help??


in reply to epoch reduction

say for sort values %{{map {join( ' ', ( gmtime($_) )[3..5] ) => $_} @times}};

But only if your input data is already sorted...

;-)

Update: And assuming (cf. Marshall's question above) that by "largest" you mean "latest".

Update 2: And of course if your date-times go back to more than 10 years ago (more precisely, to before 9 Sep 2001 03:46:40), the sort needs to be replaced by sort { $a <=> $b }.


Comment on Re: epoch reduction
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2014-12-18 07:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (44 votes), past polls