...The methods inherited from HTML::Parser are used forbuilding the HTML tree, and the methods inherited from HTML::Element are what you use to scrutinize the tree. Besides this (HTML::TreeBuilder) documentation, you must also carefully read the HTML::Element documentation, and also skim the HTML::Parser documentation -- probably only its parse and parse_file methods are of interest.
Loosely put (in the context of your question and of HTML::Element and HTML::Parser), since <br> is NOT "as_text" - it's html - neither it nor any substitute appears the output:
$h->as_text(skip_dels => 1)
Returns a string consisting of only the text parts of the element's descendants. (Emphasis supplied)
...and NOT just BTW,
you've offered no code and your narrative cites a different module (HTML::TreeBuilder) than your title (HTML::Element). Those shortcomings make offering help more difficult than necessary.
Edited: removed irrelevant detail from the second quote from the docs; emphasized the relevant part.
In reply to Re: HTML::Element and "<br>" tags
by ww
in thread HTML::Element and "<br>" tags
by trashtalker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |