use WWW::Mechanize; my $usr = "your_username"; my $pw = "your_password"; $mech->form_number(1); $mech->field( "ctl00$MainContent$Login1$UserName", $usr); $mech->form_number(2); $mech->field("ctl00$MainContent$Login1$Password", $pw); $mech->click(); $mech->dump_text; # for debugging