in reply to RE: Re: ASCII to HTML
in thread ASCII to HTML
But here's your one-liner:
(The "|| 1" in there makes it so that even paragraphs that don't contain any carriage returns inside of them, and thus don't match in the substitution, still get included in the final list of paragraphs.)$str = join "\n<p>\n", grep s/\n/<br>\n/g || 1, split /\n\n/, $str;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: RE: Re: ASCII to HTML
by little_mistress (Monk) on Apr 05, 2000 at 23:11 UTC |