in reply to html tag matching confusion

Have you considered looking at HTML::TokeParser for this parsing of HTML? There is even an excellent tutorial for it here on this site by crazyinsomniac.

 

Ooohhh, Rob no beer function well without!