package TextStrip; use strict; my $strip_text; use base 'HTML::Parser'; sub text { $strip_text .= $_[1] } my $parser = new TextStrip; my $fh = *DATA; # open $fh onto DATA for demo $parser->parse_file($fh) && print $strip_text; __DATA__ Index

Hello World

Just Another

Parser Hack