Re: Problem with blocking
Andy Lester <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.lwp |
|---|---|
| Message-ID | <[email protected]> |
>
> sub getHyperlinks {
> my $self = shift;
> while($isParsing) { }
> return %{self->{HYPERLINKS}};
> }
The while loop is empty. Nothing can change the value of $isParsing.
You may want to investigate any of the number of extant link
extracting modules on CPAN.
For that matter, if you want to just fetch a page and return a list
of links, it can be as simple as:
use WWW::Mechanize;
my $mech = WWW::Mechanize->new( autocheck => 1 );
$mech->get( "http://myurl" );
for my $link ( $mech->links ) {
print $link->url, "\n";
}
xoxo,
Andy
--
Andy Lester => [email protected] => www.petdance.com => AIM:petdance