in reply to Creating Symmetrical AoA from some Arrays

Could create
my @tmp = ( \@arr1, \@arr2, \@arr3 );
and transpose it ...
my @all; foreach my $x (0 .. $#tmp){ foreach my $y (0 .. $#tmp){ $all[$x]->[$y] = $tmp[$y]->[$x]; } } # or my @all = map { my $x = $_ ; [ map { $tmp[$_]->[$x] } 0 .. $#tmp ] } 0 + .. $#tmp; # or do: my @all = ( \@arr1, \@arr2, \@arr3 ); and then in-place swap (i,j) with (j,i) .. but this will modify the o +riginal @arrX arrays.