From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

use strict;
use Test::More tests => 1;
my $h;
my $p = HTML::HeadParser->new($h);
$p->parse(<<EOT);
<title>Stupid example</title>
Normal text starts here.
EOT
$h = $p->header;
undef $p;
is($h->title, "Stupid example");