SPUG: Removing special characters
sthoenna at efn.org
Mon Apr 3 10:09:22 PDT 2006
^M (M may be any of @, A-Z, [, \\, ], ^, _) is some software's way of
showing a control character, a non-printable or whitespace character.
The general way to do the same thing in perl is to use \cM (in a
double-quotish context such as a substitution or "string"). But as
mike points out, \cM is one that's given an escape sequence all of
it's own, \r.
On Mon, Apr 03, 2006 at 08:41:27AM -0800, mike wrote:
> its a carraige return
> usually found in windows land
> to remove try s/\r//
> On 4/3/06, luis medrano <lmzaldivar at gmail.com> wrote:
> > List,
> > I have this character in a file "^M" but I don't know how to define
> > this on perl to remove it. This file is in a unix/linux enviroment. I
> > will really appreciate if any of you can help me to define this
> > character to be remove from the text file.
More information about the spug-list