sub getFiles { my @fileNames = [ "manimp1.txt", "manimp2.txt" ]; for my $i (0..$#fileNames) { open (FILE, "<", $fileNames[$i]) or die "Couldnt open file: $fileNames[$i]\n"; while () { $count++; my @line_array = split (/\t/, $_); chomp(@line_array); my $key = shift(@line_array); my $aref = [@line_array]; $newPrices{$key} = $aref; } delete ($newPrices{'Part Num.'}); } } #### for my $file (@fileNames) { open (FILE, "<", $file) or die "Couldnt open file: $file\n"; #### Part Num. Description Base Price Code 001051536 * (R/B 455632) 455632 001460 Ring 11.17 003034 Ball 0.82 018422 Nut 1.69 037506 Ring 3.25 041112023071 Seal Kit 402.98 041112030171 Engine Gasket Kit 611.32 041112030271 Seal Kit 1,035.86