in reply to Re^2: Change elements order in an array
in thread Change elements order in an array

Please see Re: Change elements order in an array. This node has been merged with it, and this one will be reaped.

Per part of my post in Re: Change elements order in an array, you're wanting to modify the inner arrays. This will work. Just put your original data back in. It iterates over @AoA, and for each array reference within it, slices it to the specified order, then pushes those results within a new array reference onto the @new_aoa structure.
my @new_order = (0, 1, 2, 3, 5, 4); my @AoA = ( [ qw(1 2 3 4 5 6), ], [ qw(a b c d e f), ], ); my @new_aoa; for (@AoA){ push @new_aoa, [@$_[@new_order]]; } print Dumper \@new_aoa;