in reply to Replacing Text

Take a look at HTML::Parser or HTML::TokeParser (which is simply an alternative interface for the former).

Super Search can definitely help you on this one. For starters: