Date: Tue, 09 Oct 2001 09:45:34 +1000 From: Chris Aitken <chris@ideal.net.au> To: freebsd-questions@FreeBSD.ORG Subject: Perl, Expect and ^M's Message-ID: <5.1.0.14.2.20011009092449.03bac008@mail.ideal.net.au> In-Reply-To: <20011008231608.6A40837B406@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
HI All,
I have come up with a curly one......... I have a process which is as follows
I pull a line of text out of a MySQL database with a perl script, which
launches an expect script to do stuff. Problem is, in the text I pull out
of the DB, I need some ^M's in the (ascii oct code 013). Because I cant
store ^M's in MySQL, I am using 2 carrots (^^) to state where each ^M needs
to go.
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"
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.1.0.14.2.20011009092449.03bac008>
