or even use the ":crlf" PerlIO layer to automatically translate \r\n <—> \n.
On Windows, the layer is active by default, which is why the "^M problem" does not occur. But there's nothing that would keep you from using it on Unix, too, in case you need to handle Windows-style files.
In reply to Re^2: A 'strange' character("^M") of contrasting color appearing unexpededly at the end of lines of a unix file. How can it be removed?
by Anonyrnous Monk
in thread A 'strange' character("^M") of contrasting color appearing unexpededly at the end of lines of a unix file. How can it be removed?
by lev
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |