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

Re: sort timestamps with associated names.

by salva (Abbot)
on Jul 26, 2013 at 08:43 UTC ( #1046466=note: print w/replies, xml ) Need Help??

in reply to sort timestamps with associated names.

Your data seems to use fixed length records, so you can just use substr to extract the timestamp fragment:
my @sorted = sort { substr($a, 10) cmp substr($b, 10) } @data;

Replies are listed 'Best First'.
Re^2: sort timestamps with associated names.
by Sparky (Initiate) on Jul 30, 2013 at 03:15 UTC
    Thank you to all that replied. The suggestions helped.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1046466]
[choroba]: Good morning!
[Discipulus]: good morning choroba!
[Corion]: Hi choroba, Discipulus! I hope you had a good weekend
erix looks for a red-herring joke but can't find one
Discipulus has worked physically and he rediscovered he is no more wont..
erix instead casts a baleful eye on another mysql q.

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2017-01-23 09:24 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (192 votes). Check out past polls.