If you're on linux $/ will be a line feed, but the CSV file could have the windows line endings CR LF (carriage return + line feed).
So you either need to adjust $/, or remove a bit more, for example all trailing spaces:
$line =~ s/\s+$//;
In reply to Re: the chomp does not seem to work
by moritz
in thread the chomp does not seem to work
by steph_bow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |