This is the expression I use as well. Replacing just the \n assures it works well even if there are no \r around (Unix environment). If there are (Windoze or MAC) I think they can just stay there, but one could get rid of them using:> $text =~ s/\n/<br>/g;
$text =~ s/\r//g;
In reply to Re: Re: Re: Replacing line returns with br
by MrEgo
in thread Replacing line returns with br
by dpatrick
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |