in reply to Search & Replace Parsing?

So far, I've looked at Parse::RecDescent and Template, but these don't seem to have the "search & replace" functionality that I need. RecDescent has no problems finding specific tags, but I have not been able to find out how to perform a replacement that affects the text passed in to the parser. It's simple enough to write a grammar rule that matches a <html> tag, but I don't know what to do in the action portion of the rule. If I act on @item, the changes aren't reflected in the original text.
Why don't you create an abstract tree representing your parse and then traverse it when parsing is through to generate your new syntax?

Also, I like HTML::TokeParser much more than HTML::Parser. They do the same thing but I find it easier to think the way the former tool does.