use WWW::Mechanize; my $username = 'user'; my $password = 'pass'; my $url = 'http://www.xyz.com/Login.aspx'; my $mech = WWW::Mechanize->new(autocheck => 1); $mech->get( $url ); $mech->form_name("login form name"); $mech->field("username", $username); $mech->field("password", $password); $mech->click("login button/submit name"); $mech->content() =~ /sm.th. from Track.aspx/ and print "logged in\n" __END__ #### mech-dump "http://some.web-site.com/login.html"