in reply to removing html comments from the page source

In addition to Herkum's suggestion there is an example script in HTML::TokeParser::Simple called "Stripping comments" which may be worth having a look at.
  • Comment on Re: removing html comments from the page source