Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: sort timestamps with associated names.

by Loops (Curate)
on Jul 25, 2013 at 14:14 UTC ( [id://1046351]=note: print w/replies, xml ) Need Help??


in reply to sort timestamps with associated names.

use strict; use warnings; print sort { ($a =~ m/\S+\s+(.+)$/)[0] cmp ($b =~ m/\S+\s+(.+)$/)[0] } + <DATA>; __DATA__ vmk032 2013-07-24 11:27:38 RRsnap02 2013-07-24 12:35:35 vmk000 2013-07-22 17:16:50 vmk001 2013-07-22 20:00:36 vmk009 2013-07-23 18:21:12 vmk010 2013-07-23 18:31:00 vmk020 2013-07-23 23:30:43 vmk024 2013-07-24 03:27:30 vmk031 2013-07-24 10:27:36 vmk032 2013-07-24 11:27:38

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-23 21:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found