Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 having an uproarious good time at the Monastery: (13)
As of 2014-09-02 08:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (20 votes), past polls