sub login() { $mech->get($loginPage); $mech->set_visible($email, $pass); # # the original line, below, has double quotes nested # within single quotes # #$mech->click_button('value'=>'"Sign in using our secure server"'); # no error if you remove them $mech->click_button('value'=>'Sign in using our secure server'); }