|
Other suggestion:
You can catch the error without aborting the script
by wrapping the submit_form imside an eval block.
eval
{
$mech->submit_form ( form_number => 1 ,
fields => { foo => "bar" }
);
};
if ( $@ )
{
# error
print "error ($@) ";
}
else
{
# success
$c = $mech->content;
print $c;
}
|