in reply to s/// don't delete matching phrase

Your example expression includes metacharacters (such as "?") which need to be escaped when treated as a regular expression eg. with quotemeta.

Alternatively, why not just do:

$file =~ s/<[^>]*>//g;