in reply to Re^3: crlf layer working on diamond operator, but not filehandle reads
in thread crlf layer working on diamond operator, but not filehandle reads

Your example did not work for me, and I am still unsure why. Output was Carriage return in myfile.csv at -e line 12, <INPUT> line 1. I was getting inconsistent results running it as perl -e '[BLOCK OF CODE]' myfile.csv and as perl code.pl myfile.csv. This was with Perl 5.10.1 running in Cygwin. I'm guessing it has something to do with Cygwin.

Replies are listed 'Best First'.
Re^5: crlf layer working on diamond operator, but not filehandle reads
by ikegami (Patriarch) on Nov 23, 2011 at 20:24 UTC

    I don't know how cygwin (which emulates a system that uses CRLF line endings) interacts with the rest of the system (which uses CRLF line endings). It is definitely a likely cause. My guess: It placed \r\r\n in the .csv.