http://learn.perl.org/faq/perlfaq4.html#How-do-I-sort-an-array-by-anything-, http://perldoc.perl.org/perlfaq4.html#How-do-I-sort-an-array-by-%28anything%29%3f
After which use a array slice or splice to get the top N
Potential alternative that might be faster is Sort::Key::Top - select and sort top n elements
In reply to Re: sorting array of arrays reference
by Anonymous Monk
in thread sorting array of arrays reference
by kimlid2810
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |