$data =~ s/\n{2,}/<p>\n/g;
For a more general approach of turning plain text into HTML, check out HTML::TextToHTML.
In reply to Re: Adding HTML tags to plain text
by saintmike
in thread Adding HTML tags to plain text
by mhearse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |