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

Re: sorting array of arrays reference

by salva (Canon)
on Oct 25, 2013 at 17:38 UTC ( [id://1059722]=note: print w/replies, xml ) Need Help??


in reply to sorting array of arrays reference

Use Sort::Key::Top which implements the Selection Algorithm:
use Sort::Key::Top qw(rikeytopsort); my @sorted = rikeytopsort { $_->[2] } 3 => @masterArray; # rikeytopsort means... # r => reverse (descending) order # i => the key is an integer # key => use a key extraction block # top => get the top n elements # sort => sorted

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2024-04-24 09:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found