Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 romping around the Monastery: (10)
As of 2014-07-23 08:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (137 votes), past polls