my $mech = WWW::Mechanize->new(); $mech->get("http://my.server.com/my/path"); if (! $mech=>success) { # attempt to recover } #### Error GETing http://your-uri: reason #### Error GETing http://cantreachthis.com: Page not found (You didn't specify 'autocheck' in new(); use 'autocheck => 1' to if you want to check status yourself.) #### if ($ENV{WWW_MECH_IGNORING_AUTOCHECK_REQUIREMENT}) { ... }