Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
My current script is
Without manually removing this bad link from the script, how can I make it SKIP this and any future links that it can't load for whatever reason and move on to the next without warnings or errors?foreach my $newlink (keys %templinks) { my $mech = WWW::Mechanize->new( autocheck => 1 ); $mech->get( $newlink ); foreach ($mech->find_all_links) { $templinks{$_->url} = $_->url; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to make www::mech not die on errors
by Corion (Patriarch) on Apr 06, 2007 at 22:13 UTC |