From perlfaq4 - How do I sort an array by (anything)?:
If you need to sort on several fields, the following paradigm is useful.
@sorted = sort { field1($a) <=> field1($b) || field2($a) cmp field2($b) || field3($a) cmp field3($b) } @data;
(Also, it's "Perl", not "PERL")
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: MsExcel like Multi Column Sorting
by davorg
in thread MsExcel like Multi Column Sorting
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |