right - my bad.   what i mean, not what i say!

thanks rob.

-Tom Kinzer

-----Original Message-----
From: Rob Dixon [mailto:[EMAIL PROTECTED]
Sent: Friday, December 19, 2003 3:07 AM
To: [EMAIL PROTECTED]
Subject: Re: how to remove a ^M charaters from a variable


Tom Kinzer wrote:
>
> tr/015//;

This will do nothing to the string. It will just return the
number of zero, one and five characters it finds.

Control-M is

  "\cM"
or
  "\x0D"
or
  "\015"
or
  "\r"

To get 'tr' to delete the characters it finds you need the /d
modifier.

  tr/\015//d

will do the trick.

Cheers,

Rob



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to