in reply to How to swap rows with columns? - Still unresolved :(

You got several answers how to transpose an AoA in How to swap rows with columns? already. Why can't you just use one of those, or simply load your input data into your destination array in the order you want it?

my @data; while( <$in> ) { chomp; my( @cur ) = split( /\s+/, $_ ); push @{ $data[ $_ ] }, $cur[ $_ ] for 0..$#cur; }

Update: And on closer inspection this is exactly like what you've already been given. I think I'm just going to take the rest of the day off since ikegami's already beaten me to the punch at least twice today . . . %)