Jupiterhost.Net wrote:
Gunnar Hjalmarsson wrote:
Jupiterhost.Net wrote:
$text =~ s/\r//g;
$text =~ s/\n/<br \/>/g;
Why not just:
$text =~ s!\r?\n!<br />!g;
That'll work fine, I've just seen that do unexpected things with
lines before so I like to kill the \r completely so the output is
more predictable.
Guess that's a valid reason. Unexpected things *can* happen when you
jump between various platforms, and your code may take care of certain
oddities.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>