Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Oct 2001 21:25:59 -0300 (ART)
From:      Fernando Gleiser <fgleiser@cactus.fi.uba.ar>
To:        Chris Aitken <chris@ideal.net.au>
Cc:        <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Perl, Expect and ^M's
Message-ID:  <20011008212140.W13268-100000@cactus.fi.uba.ar>
In-Reply-To: <5.1.0.14.2.20011009092449.03bac008@mail.ideal.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 9 Oct 2001, Chris Aitken wrote:

> HI All,
>
>
> Example -
>
> "The Cat Shat In The Hat^^Bad Cat^^Baaaaaad Cat"
>
> I pull this line out of the DB, and I need to be able to replace the ^^'s
> with ^M's to look like the following
>
> "The Cat Shat In The Hat^MBad Cat^MBaaaaaad Cat"

$string=~s/\^\^/\r/g;
print $string


			Fer



>
>
>
>
> I would love to be able to do this at the very end process and replace all
> ^^'s with ^M's in the Expect script, but it might be that I need to do it
> in the Perl script.
>
>
> Anyone able to give me a slight nudge with the clue stick?
>
>
>
>
> Thanks
>
>
> Chris
>
> --
>      Chris Aitken - Administration/Database Designer - IDEAL Internet
>   email: chris@ideal.net.au  phone: +61 2 4628 8888  fax: +61 2 4628 8890
>               __-----------------------------------------__
>     It is said that if you line up all the cars in the world end to end,
>           some moron in a rotary will still to try and pass them
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011008212140.W13268-100000>