in reply to Sort Array Reference by Numeric First Element
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!
|
|---|