Hi all,
I made a simple script which should download some file to my PC, the program make a request with LWP and from the HTML I get the links to the files I need into an array. Now I use WWW::Mechanize to get the files (I know that there are some other options but I can use only this one). when there is a link that appears to be wrong the program exit with an error: "Error GETing some_url Internal Server Error at myscript.pl line 171" Now what I need is, even if there is an error I want the script to move to the next URL on the Array without exiting. Any suggestions ???
sub getFile{ my @files = @_; my $mech = WWW::Mechanize->new; my $fileIndex = 1; foreach my $file (@files){ $mech->get( $file, ':content_file' => "myFile$fileIndex.txt" ) +; $fileIndex++; } }
In reply to WWW::Mechanize Error "GETing" stop the program, by RedGrinGo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |