for my $file (@files) { while () $line_number= $list[0]; push @($var1{$i}), $list[1]; etc... } close IN; }