# order matters $raw_text =~ s/\015\012/\n/g; $raw_text =~ s/\012/\n/g unless "\n" eq "\012"; $raw_text =~ s/\015/\n/g unless "\n" eq "\015";
Does it make any difference if I use s/\cM\cJ/cJ/ vs. s/\015\012/\n/g ?
Since the newline convention is not necessarily the one in the runtime platform you cannot write a line-oriented script. If files are too big to slurp then you'd work on chunks, but need to check by hand whether a CRLF has been cut in the middle.
I'm reading each line in a while loop, so it should work fine on a large file? -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>