in reply to Parsing with HTML::Parser

That task seems like it might be handled better with a more specific tool than HTML::Parser.

Both HTML::TagFilter and HTML::CGIChecker offer fuctions for removing unwanted HTML tags, and offer simple ways to allow certain safe tags to filter through if you want that.