in reply to making html smaller

A quick search of CPAN turned up the HTML::Clean module, which might do what you want.

Or it could be more work than it's worth, if your own regex already fits the bill.
    cheers,
    ybiC