If its really big go for the Schwartzian Transform. You would end up with something like this:
@sorted = map {$_->[1]} sort { $a[0] <=> $b->[0] } map { [$_[4],$_] } @unsorted;
The second line (the "<==> part") might need to be changed if you are sorting something other than numbers. This technique is excelent for very complicated structures, very big structures, and is just neat overall :)
--awwaiidIn reply to RE: Sorting an Associative Array?
by awwaiid
in thread Sorting an Associative Array?
by target
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |