my $mech = WWW::Mechanize->new(); $mech->get("http://my.server.com/my/path"); if (! $mech=>success) { # attempt to recover }