Sort the indices, not the arrays themselves:
my @indices= 0..$#arr_score; @indices= sort { $arr_score[ $a ] <=> $arr_score[ $b ] } @indices; for my $i (@indices) { print "$arr_thumbnail[ $i ] - $arr_url[ $i ] - $arr_score[ $i ]\n" +; };
Alternatively, restructure your data into hashes, and sort that array.
In reply to Re: how to sort
by Corion
in thread how to sort
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |