my $mech = WWW::Mechanize->new(); $mech->get($url); $mech->field("UserName", $username); $mech->field("Password", $password); $mech->submit_form();