use HTML::TreeBuilder::XPath; my $x = HTML::TreeBuilder::XPath->new; $x->parse(<Der Titel Jetzt fängt der Body an EOF warn $x->findvalue('//body');