in reply to Replacing new lines in multi line text box form fields with <br>.
Use a character class to deal with LF CR and CRLF line endings. A standard newline after the
maintains readability.
maintains readability.
$INPUT{'comments'} =~ s/[\r\n]+/<br>\n/g;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Replacing new lines in multi line text box form fields with <br>.
by Smylers (Pilgrim) on Nov 26, 2004 at 09:20 UTC | |
by tachyon (Chancellor) on Nov 27, 2004 at 06:06 UTC |
In Section
Seekers of Perl Wisdom