And it doesn't look like any of my regex's are matching. But if I take the else line out, it submits the form no problem. Any thoughts?foreach my $inputfield (@inputfields) { if($inputfield =~ /(F|f)(irst)?name/) { $mech->set_fields( $inputfield => $fname); print "matched firstname regex\n"; } elsif($inputfield =~ /(L|l)(ast)?name/) { $mech->set_fields( $inputfield => $lname); } elsif($inputfield =~ /(A|a)ddress[123]?/) { $mech->set_fields( $inputfield => $address); } elsif($inputfield =~ /(C|c)ity/) { $mech->set_fields( $inputfield => $city); } elsif($inputfield =~ /(S|s)tate/) { $mech->set_fields( $inputfield => $state); } elsif($inputfield =~ /(Z|z)ip/) { $mech->set_fields( $inputfield => $zip); } elsif($inputfield =~ /(P|p)hone/) { $mech->set_fields( $inputfield => $phone); } else { $submit="0"; print "Setting submit=0\n"; } }
In reply to Re^4: WWW:Mechanize problems
by stanislav5000
in thread WWW:Mechanize problems
by stanislav5000
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |