From owner-freebsd-questions Mon Oct 8 16:45:24 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail.ideal.net.au (ion.ideal.net.au [203.20.241.5]) by hub.freebsd.org (Postfix) with ESMTP id A43F137B405 for ; Mon, 8 Oct 2001 16:45:19 -0700 (PDT) Received: from helium.ideal.net.au (trilluser@helium.staff.ideal.net.au [202.3.35.2]) by mail.ideal.net.au (8.9.3/8.9.3) with ESMTP id JAA14493 for ; Tue, 9 Oct 2001 09:45:11 +1000 (EST) (envelope-from chris@ideal.net.au) Message-Id: <5.1.0.14.2.20011009092449.03bac008@mail.ideal.net.au> X-Sender: chris@mail.ideal.net.au X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Tue, 09 Oct 2001 09:45:34 +1000 To: freebsd-questions@FreeBSD.ORG From: Chris Aitken Subject: Perl, Expect and ^M's In-Reply-To: <20011008231608.6A40837B406@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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