Hello,
I can't find any help for my problem on the web anywhere.
I have a quick question about the HTML::Parser
module. I am fairly new to perl so please forgive
me.
I am using the HTML::Parser module to parse HTML
files in a foreach execution block. It seems to
run fine at first, but about halfway through the
list of URLs it gives me the following error message:
Usage: HTML::Parser::parse(self, chunk) at linkfind.pl line 78.
Here are the lines of code I am using:
foreach $base_url(keys
VALS){
$parser = HTML::LinkExtor->new(undef, $base_url);
$parser->parse(get($base_url))->eof;
@links = $parser->links;
foreach $linkarray(@links){
my @element = @$linkarray;
my @elt_type = shift @element;
while(@element){
my ($attr_name , $attr_value) = splice (@element, 0, 2);
if($attr_value =~ /htm|cgi|asp|\/\$|com\$|net\$/){
$VALBAK{$attr_value} = $attr_value;
}
}
}
}
Then the links in %VALBAK are inserted back into
%DBVALS (after it is cleared), and it loops again.
I can't figure out why it would execute fine for
some of the urls, but then stop suddenly.
Please help me.
Thank You,
Chris