Well, since you haven't showed what you have tried no one's going to know how you've gone wrong so far. At any rate:
- Unless you've got very, very simple HTML you don't want to try to parse it with a regex
- For this case you may find that HTML::TokeParser::Simple or HTML::TokeParser is going to work the best (copy things verbatim as you go along; stop printing when you see the start comment, start printing again at the end tag)