Your skill will accomplish what the force of many cannot |
|
PerlMonks |
\r\n at end of lineby John M. Dlugosz (Monsignor) |
on Apr 19, 2011 at 00:26 UTC ( [id://900026]=perlquestion: print w/replies, xml ) | Need Help?? |
John M. Dlugosz has asked for the wisdom of the Perl Monks concerning the following question:
Working in Windows, I was used to Perl normalizing the end-of-line sequence to a \n even if it was \r\n on the disk. Under Linix, I'm seeing \r's left on the line after I chomp them. Since files may come from HTTP or other network stuff that uses \r\n naturally, I should handle it. How do I do a chomp saying "remove any style of line ending from this line, whatever it may be"?
Thanks
Back to
Seekers of Perl Wisdom
|
|