my @sorted = sort {my @A = (split '\|', $a)[4, 5]; my @B = (split '\|', $b)[4, 5]; $A[0] cmp $B[0] || $A[1] <=> $B[1]} @unsorted;
Update: Fixed bug pointed out by chromatic below.
In reply to Re: Need help with a script
by lidden
in thread Need help with a script
by kepler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |