in reply to Why is HTML::Treebuilder chopping the last word off my html?

You missed to call ->eof.
use strict; use warnings; use HTML::TreeBuilder; my $treeroot = HTML::TreeBuilder->new; #$treeroot->store_comments(1); my $whole_file = 'Some text. Some more text.'; $treeroot->parse( $whole_file ); $treeroot->eof(); #$treeroot->elementify(); # elementify doesn't matter either way. $treeroot->dump();
Boris

Replies are listed 'Best First'.
Re^2: Why is HTML::Treebuilder chopping the last word off my html?
by tphyahoo (Vicar) on Oct 17, 2005 at 11:42 UTC
    Yep, that was the problem. Thanks borisz!