http://www.perlmonks.org?node_id=805548


in reply to parsing html content

And check out HTML::TokeParser.