In addition to the others, there is a shorter way to sort for the first column of a two dimensional array:
my @sorted = sort {"@$a" <=> "@$b"} @two_dim;
But please don't use it in production code :-)
Greetings,In reply to Re: sorting a two dimensional array by one column
by bigj
in thread sorting a two dimensional array by one column
by dannoura
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |