You're very close. What you want is to remove the '@' signs on the array references, and to put '[ ... ]' around the sort:
my $array2 = [ sort { $a->[0] <=> $b->[0] } @$array ];
That should do what you need!
In reply to Re: Sort Array Reference by Numeric First Element
by liverpole
in thread Sort Array Reference by Numeric First Element
by awohld
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |