If that's not the case, saving the indicies and using them twice would do the trick:
my @indicies = sort { $array_b[$a] <=> $array_b[$b] } 0..$#array_b; my @sorted_a = @array_a[@indicies]; my @sorted_b = @array_b[@indicies];
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to Re^3: Sorting multiple arrays
by merlyn
in thread Sorting multiple arrays
by Kempie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |