in reply to Re: parsing data from file
in thread parsing data from file

ack! why use chop when you can use the safer chomp? And how come neither was used inside the while (<MAPFILE>)? Finally, why did you remove the call to lc?

# chomp the inputs to remove the trailing \n chomp(my $l = <STDIN>); . . . # 3-arg open safer. # No use putting quotes around $sdtfile. open(MAPFILE, '<', $sdtfile) or die("Unable to open map file: $!\n"); # No need to load whole file in memory. # Use while instead of foreach. while (<MAPFILE>) { my ( $date, $time, $lot, $waf, $ts, $sstep, $machine, $prog, $product, $plnfile, $striping, ) = map lc, split(/,/, $_); if (...) { . . . } }