use strict; use warnings; my @list=map{chomp;$_}; my @output; foreach my $line (@list) { foreach my $ofs (0..length($line)-1) { $output[$ofs].=substr($line,$ofs,1); } } print join ("\n",@output),"\n"; __DATA__ ABC DEF GHI JKL MNO PQR STU