Posted on 2009-03-11 21:44:40-07 by runes in response to 10042
Re: login problem

You should click the button, rather than submitting the form, so I suggest:
$ua->field('ctl00$MainPlaceHolder$usernameText' => $username);
$ua->field('ctl00$MainPlaceHolder$passwordText' => $password);
$ua->click;

WWW::Mechanize handles cookies just fine by default, so there is no need to do $ua->cookie_jar({});

Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.