use 5.010; use HTML::TreeBuilder::XPath; my $tree= HTML::TreeBuilder::XPath->new; my $html = <<'HTML'; four one two three HTML $tree->parse($html); say $tree->findvalue( '/html/head/title');