Note: this code only replaces carriage returns, not line feeds.

Remember an ancient typewriter. The carriage return returns the carriage to
the beginning of the line, but does not advance to the next line. This
enables the typist to overstrike, underline, or embolden characters. The
linefeed advances to the next line, and used without a carriage return,
enabled e.e.cummings to write his non-stop paragraphing.

- Roger -

----- Original Message -----
From: "Guy Tubbs" <[EMAIL PROTECTED]>
To: "Roger C Haslock" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, October 02, 2001 9:52 AM
Subject: RE: Replacing carriage returns in a variable


> Thanks for your replies.
>
> It does insert another character, but keeps the return too.
>
> I have tried:
> $text =~ s/\n/<br>/g;
>
> and
>
> $text =~ s/\r/<br>/g;
>
> but it does the same thing, i.e. I get:
>
>   Line1<br>
>   Line2
>
> What I need is:
>
>   Line1<br>Line2
>
> Do you know how to get rid of the returns altogether?
>
> Guy
>
>
>
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to