Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: sorting entires by date

by pg (Canon)
on Jan 01, 2004 at 23:18 UTC ( #318189=note: print w/ replies, xml ) Need Help??


in reply to sorting entires by date

First get your file into an array thru Tie::File, then:

use Data::Dumper; my @a = ("image1.jpg:100:250:1062352538", "image2.jpg:650:175:10623403 +59"); @a = sort {(split(":", $a))[-1] <=> (split(":", $b))[-1]} @a; print Dumper(\@a);


Comment on Re: sorting entires by date
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2015-07-03 17:56 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 (55 votes), past polls