in reply to Ignoring specific html tags before parsing
If you look at HTML::Parser, it has a couple of examples. In fact, the second one is very close to what you're wanting. Since HTML::TreeBuilder builds on top of HTML parser, you should be able to tweak it to do what you want when you parse it. Looking at the docs, it appears that the eg/hstrip example in the distribution can be coerced into doing what you're attempting to do.
Disclaimer: I've not done anything significant with HTML::Parser.
When your only tool is a hammer, all problems look like your thumb.