in reply to Creating a two dimensional array and sorting by index
See perldata, perllol and perlfunc (for map and sort).
--my @AoA = ( [ 'foo' , 1 ], [ 'bar' , 5 ], [ 'buz' , 3 ], ); print "@$_\n" for sort { $a->[1] <=> $b->[1] } @AoA; @AoA = (); #free structure
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Creating a two dimensional array and sorting by index
by kirk123 (Beadle) on Dec 09, 2002 at 20:10 UTC |