in reply to Re^4: Variable blasphemy
in thread Variable blasphemy

Ah. That explains it. Windows Linebreak consists of CarriageReturn and LineFeed while Linux uses a LineFeed. Your chomp only strips the LineFeed, but leaves the CarriageReturn in place.

You can either pre-process the CSV file with dos2unix / flip or some other tool or manually strip the CarriageReturn in perl.