Perl Mechanize Check Mirror Response For Errors

[Solved] Perl Mechanize Check Mirror Response For Errors | Perl - Code Explorer | yomemimo.com
Question : perl mechanize check mirror response for errors

Answered by : vternal3

my $response = $mech->mirror($abs_url, $filename)->message; print Dumper($response); #print response: [OK, Not Found, Not Modified] if($response eq 'Not Found'){ #responds code here to error trying to download. } if($response eq 'Not Modified'){ #responds code here to unmodified download. } if($response eq 'OK'){ #responds code here to download successfully. }

Source : | Last Update : Sun, 17 Oct 21

Answers related to perl mechanize check mirror response for errors

Code Explorer Popular Question For Perl