# an topegs Code angelehnt: my @columns; #... while (my $line = <$fh>) { #... push @{ $columns[$_]->{$id} }, $words[$_] for 0 .. $#words;