http://www.perlmonks.org?node_id=712948


in reply to Using the contents of

The documentation says that alternatively to

$p = HTML::TokeParser->new( $filename, %opt );
you can use
$p = HTML::TokeParser->new( \$document, %opt );

Which is what I'd use then.