#!perl -w use strict; use Test::More tests => 2; use HTML::Parser (); my $dtext = ""; my $text = ""; sub append { $dtext .= shift; $text .= shift; } my $p = HTML::Parser->new(text_h => [\&append, "dtext, text"], default_h => [\&append, "text, text" ], ); my $doc = <<'EOT';