Beefy Boxes and Bandwidth Generously Provided by pair Networks
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 chilling in the Monastery: (6)
As of 2015-07-29 07:06 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 (260 votes), past polls