for my $i (0 .. length( $in[0] ) - 1 ) { push @out, join '', map substr( $_,$i,1 ), @in; }