Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://144792]
help
Chatterbox?
1nickt is installing all Perl versions so as to be able to send test reports to CPANTS ...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2017-09-19 17:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (226 votes). Check out past polls.

    Notices?