in reply to how to remove html tags

HTML::Parser and it's cronies HTML::TokeParser or HTML::PullParser might be what you're looking for.

Specifically, HTML::Parser's ignore_elements() method comes to mind.