To numerically sort @myarray by the second column do this:
1 |
@myarray = sort { $a->[1] <=> $b->[1] } @myarray; |
Here is an alpha sort of @myarray on the third column:
1 |
@myarray = sort { $a->[2] cmp $b->[2] } @myarray; |