# click the button, then get a 'working.' page: $ans = $mech->click_button( input => $inputobj ); while ($mech->response() =~ m/working/) { sleep(5); $ans = $mech->reload(); }