Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Sorting by column

by jbt (Chaplain)
on Sep 15, 2009 at 03:54 UTC ( [id://795282]=note: print w/replies, xml ) Need Help??


in reply to Sorting by column

One way to do it:

sub by_row { my ($first, $second) = ($a, $b); $first =~ s/\d+\s+(.*)/\1/; $second =~ s/\d+\s+(.*)/\1/; $first cmp $second; } @array = sort by_row @array;

Log In?
Username:
Password:

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

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

    No recent polls found