in reply to Adding HTML tags to plain text

To search for two or more newlines and replace them by <p>\n, use this:

$data =~ s/\n{2,}/<p>\n/g;

For a more general approach of turning plain text into HTML, check out HTML::TextToHTML.

Replies are listed 'Best First'.
Re^2: Adding HTML tags to plain text
by mhearse (Chaplain) on Mar 10, 2005 at 21:19 UTC
    That did it. Thanks.