Beefy Boxes and Bandwidth Generously Provided by pair Networks kudra
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Sorting an array of lines

by CharlesClarkson (Curate)
on Feb 12, 2002 at 06:46 UTC ( #144792=note: print w/ replies, xml ) Need Help??


in reply to Sorting an array of lines

Since you have some leading spaces in your lines, I used column 8 for the sort instead of column 7. '-8n' means sort descending on column 8 numerically.

use Sort::Fields; my @sorted = fieldsort ['-8n'], @array;



HTH,
Charles K. Clarkson
Clarkson Energy Homes, Inc.


Comment on Re: Sorting an array of lines
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2014-04-20 19:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (487 votes), past polls