in reply to Re: Perl Interpreter / OS problem
in thread Perl Interpreter / OS problem
It gives me an "Cannot Pass an unidentified VALUE to an Array" error.#perl.exe use strict; $|++; use WWW::Mechanize; my %seen; my $scraper = WWW::Mechanize->new(); my $mech = WWW::Mechanize->new(); my $home = <STDIN>; &main($home); sub main { my $line = shift; $scraper->get($line); my @LinkArray = $scraper->find_all_links(); if (defined @LinkArray){ my @urls = map { $_->[0]} @LinkArray; shift @urls if $seen{$line}++; foreach my $url(@urls){ print "\n", $url; ++$index_level; $scraper->get($url); next if $seen{$url}++; &followlink($url); } my $dest = shift @PublicLinks; &main($dest); return; }else{ return; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Perl Interpreter / OS problem
by swaroop.m (Monk) on Aug 26, 2004 at 15:46 UTC |