I suspect it isn't working because you're $mech->geting $url2. I don't think you want to do that - after you've POSTed with $mech->click, $mech's "current url" ($mech->uri) will change. Try removing the line $mech->get($url2); and see if it works.
I can see a few other problems with your code:
In reply to Re: Form won't post
by missingthepoint
in thread Form won't post
by everlast88az
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |