open(my $fh, "<:utf8", "index.html") || die "Can't open 'index.html': $!"; my $p = HTML::TokeParser->new( $fh ); # ... #### utf8::decode($document); my $p = HTML::TokeParser->new( \$document ); # ...
## utf8::decode($document); my $p = HTML::TokeParser->new( \$document ); # ...