@sorted_names = @names[sort { $ages[$a] <=> $ages[$b] } 0..$#ages]; [download]
In reply to Simple sorting by another parallel array by merlyn