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

Re^2: sort based on last and first value

by soonix (Vicar)
on Aug 27, 2013 at 09:47 UTC ( #1051099=note: print w/ replies, xml ) Need Help??


in reply to Re: sort based on last and first value
in thread sort based on last and first value

just as I was arduously composing this, which does roughly the same:

my %latest; for (sort <INFO>) { # by date my ($date, $path) = split "/", $_, 2; # assuming these are compl +ete paths $latest{$path} = $_; # newer overwrites older } # output ordered by "path" values print $latest{$_} for sort keys %latest;


Comment on Re^2: sort based on last and first value
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2015-07-04 16:20 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