in reply to How to avoid addition of tags by HTML::TreeBuilder
You should take a look at Mojo::DOM for manipulating the HTML.