Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: sort timestamps with associated names.

by hdb (Prior)
on Jul 26, 2013 at 08:34 UTC ( #1046463=note: print w/ replies, xml ) Need Help??


in reply to sort timestamps with associated names.

Just for fun and not to be taken too seriously, here is a "Pseudo-Schwartzian" solution:

use strict; use warnings; print map { /^(.{19})(.*)$/; "$2$1\n" } sort map { /^(.*)(.{19})$/; + "$2$1" } <DATA>; __DATA__ 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 vmk032 2013-07-24 11:27:38

UPDATE: -- for me for not realizing that choroba had posted the same thing above already: Re: sort timestamps with associated names.


Comment on Re: sort timestamps with associated names.
Download Code
Replies are listed 'Best First'.
Re^2: sort timestamps with associated names.
by choroba (Canon) on Jul 26, 2013 at 08:50 UTC
    This is not ST, it is Guttman Rosler.
    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (12)
As of 2015-07-31 19:47 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 (280 votes), past polls