use strict;
use LWP::Simple;
use HTML::Parser;
# get the content of the web page
my $content = get("http://www.google.com/");
# instaniate a new parser and let it crunch our data
my @lines;
my $parser = new MyParser;
$parser->parse($content);
{
package MyParser;
use base qw(HTML::Parser);
# this method supplies the text, no tags :)
sub text {
my ($self, $origtext) = @_;
print $origtext, "\n";
}
}
####
my $stripped_html; # or whatever you wanna call it
##
##
$stripped_html .= $origtext;
##
##
my @stripped_html;
#and inside &text
push(@stripped_html, $origtext);