As you already know,
TEXT<br /><br /> is not the same thing as
<p>TEXT</p>. That would be the equivalent of comparing
<h2>TEXT</h2> to
<b>TEXT</b>.
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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.