in reply to Convert line break: TEXT<br><br> to paragraph: <p>TEXT</p>
I'd personally look at how the page you're seeing is constructed, and convert on an as-needed basis. There are many uses for <br />, which do not necessarily convert to <p> directly.
Look into HTML::TokeParser and HTML::TreeBuilder to abstract the text values of those tags and put them inside your nested paragraph tags.
Just be aware that what you're doing is most-likely entirely wrong, but perl will let you do it.
|
|---|