I am trying to match just the string that is inside the html tags in the comment section of a html file (<!-- this is a comment -->) and replace it with caps. I found a way to match everything in the pattern, including the tags, but that is not what I am after.

This regex matches everything, but I am just trying to match the text "this is a comment" and replace it with caps. This is for a homework exercise so any help or tips will be appreciated. Thanks!

Write a substitute command that will convert all html comments to upper case.

The first is best done with a CPAN module such as Slurp. In your case it is probably sufficient to undefine the INPUT_RECORD_SEPARATOR ($/ - Refer perldoc perlvar).

Your regex has to match all the special characters that make up an html comment. This is a bit difficult because many of them are regex metacharacters. The easy solution is to use \Q...\E to escape all-non alpha characters. Be careful not to escape any characters that you intend to have the usual regex meaning.