Well, for one thing, I don't see where you're writing the changes out to a file. You're reading the file in (implicitly) to $_, and then you're performing the substitution, and then you're moving on to the next line without ever writing the current line out to a new file.
The other issues that you're going to encounter include (but are not limited to):
- Newline characters are valid within HTML tags, but your RE doesn't allow for them.
- Your RE will replace the text matched by the pattern everywhere, which is to say, even within text that isn't part of an HTML tag. In other words, if 10pt exists as part of the actual text, it will get replaced too, thus, changing the meaning of the text, rather than how it is rendered.
- Regular Expressions are generally the wrong tool for the job in parsing HTML. There are modules for that on CPAN.
Some of these issues were discussed in the Chatterbox when you asked there.