my @AoA; while () { my $n = 0; for (split) { push @{$AoA[$n++]}, $_; } }