my @AoA = ( [ 'foo' , 1 ], [ 'bar' , 5 ], [ 'buz' , 3 ], ); print "@$_\n" for sort { $a->[1] <=> $b->[1] } @AoA; @AoA = (); #free structure