Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 }.

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 drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2016-07-26 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (231 votes). Check out past polls.