in reply to sorting multiple arrays on the criteria of one array

Here is one way.
my @a1 = qw/1 4 6 8 7 5/; my @a2 = qw/a b c d e f/; my @a3 = qw/g h i j k l/; my $c = 0; map { ( $a1[ $c ], $a2[ $c ], $a3[ $c ] ) = @$_; $c++; () } sort { $a->[0] <=> $b->[0] } map { [ $a1[$_], $a2[$_], $a3[$_] ] } ( 0 .. $#a1 );
Boris