HTML-Tree is a suite of Perl modules for making parse trees out of HTML source. It consists of mainly two modules, whose documentation you should refer to: HTML::TreeBuilder and HTML::Element. This requires perl-html-parser, perl-Test-Exception and perl-html-tagset.