... or if ($content_flag) { $main_content .= $text; } } my $html = " Blah Here's the body 1

para1

para2

"; my $parser = MyParser->new; $parser->parse("$html"); print "$main_content\n";