in reply to Re: A 'strange' character("^M") of contrasting color appearing unexpededly at the end of lines of a unix file. How can it be removed?
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?

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.

  • Comment on 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?
  • Select or Download Code