use HTML::TreeBuilder::XPath; my $tree = HTML::TreeBuilder::XPath->new; $tree->parse_content(do { local($/); }); for my $result ($tree->findnodes(q{/html/body/div})) { my $x = HTML::TreeBuilder::XPath->new; $x->parse($result->as_HTML); print $x->findvalue(q{//div[@class="here"]}); print "
".("-" x 17)."
"; } __DATA__;
this's the value
this's the value
this's the value
this's the value
this's the value
this's the value