in reply to How to avoid addition of tags by HTML::TreeBuilder

It seems it adds the html and head tags for convenience, you can just get the body like this:

my $body = $root->find('body'); print $body->as_HTML;

edit: Although, now it seems that the ending /p tags go missing and I am not sure why. Maybe the module is not perfect, try this as a workaround:

my @foo = $html->look_down( _tag => "body", ) ; foreach( @foo ) { my $output_html = $_->as_HTML(undef,undef,{}); print $output_html; last ; }