eval { $mech->post($url, [ 'username' => $user, 'password' => $pass, ]); }; $checked++; if ($@) { croak $@; goto RETRY; }