in reply to append array

Some people smell homework... Me ive got a cold so I cant smell anything....

use 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
Outputs

ADGJMPS
BEHKNQT
CFILORU

I hope I get a good mark ;-)

Yves / DeMerphq
---
Writing a good benchmark isnt as easy as it might look.