BEGIN { $| = 1; print "1..1\n"; } use HTML::Content::Extractor; my $html = q~
blah blah blah
main text in div tag
~; my $obj = HTML::Content::Extractor->new(); $obj->analyze($html); my $main_text = $obj->get_main_text_with_elements(0, ["span"]); if($main_text eq "main text in div tag") { print "ok 1\n"; } else { print "not ok 1\n"; }