in reply to Do the Schwartzian boogy!
@AoA = ( [ "n1", "34" ], [ "n3", "14" ], [ "n2", "1" ], [ "n4", "5" ], ); @sorted = sort { $a->[1] <=> $b->[1] } @AoA; use Data::Dumper; $Data::Dumper::Indent=1;die Dumper\@sorted; __END__ $VAR1 = [ [ 'n2', 1 ], [ 'n4', 5 ], [ 'n3', 14 ], [ 'n1', 34 ] ];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Do the Schwartzian boogy!
by rvosa (Curate) on May 30, 2005 at 10:02 UTC |