my @data; while( <$in> ) { chomp; my( @cur ) = split( /\s+/, $_ ); push @{ $data[ $_ ] }, $cur[ $_ ] for 0..$#cur; }