Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Sorting an array of lines

by CharlesClarkson (Curate)
on Feb 12, 2002 at 06:46 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://144792]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-19 10:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found