in reply to Getting strings from HTML::Parser
Another example can be found here.use HTML::Parser; print strip("<b>Hello</b>!\n"); sub strip { my $html = ''; my $p = new HTML::Parser( api_version => 3, text_h => [ sub { $html .= shift }, 'text'], ); $p->parse(shift); $p->eof; return $html; }
gav^
|
|---|