Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 scrutinizing the Monastery: (9)
As of 2015-07-04 15:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls