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_raw_text(); if($main_text eq "
main text in div tag
") { print "ok 1\n"; } else { print "not ok 1\n"; }