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

The csv file was saved under windows, yes. Do I need to open it a different way?

Replies are listed 'Best First'.
Re^5: Variable blasphemy
by Monk::Thomas (Friar) on Jul 24, 2015 at 15:55 UTC

    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.