This isn't the source of your problem, but it is something else you'll need to fix. On this line:
while (($read)=<IN>) {
By putting $read in parentheses, you create a list context for the <IN>. As such, it will read the whole file and just put the first line in $read.
my $line; while ( ($line) = <DATA> ) { print "line: $line"; } __DATA__ line 1 line 2 line 3
This outputs:
line: line 1
I think you want this instead:
while ($read=<IN>) {
In reply to Re: Reading a CSV file
by kyle
in thread Reading a CSV file
by alchang
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |