in reply to append array
Outputsuse strict; use warnings; my @list=map{chomp;$_}<DATA>; 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
ADGJMPS BEHKNQT CFILORUI hope I get a good mark ;-)
Yves / DeMerphq
---
Writing a good benchmark isnt as easy as it might look.
|
|---|