use strict; use warnings; use strict; use WWW::Mechanize; use LWP ; use HTTP::Cookies; my $url = 'http://2010.tct.ir/CustomerSignIn.aspx'; my $username = 'X'; my $password = 'Y'; my $mech = WWW::Mechanize->new( agent=>"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040918 Firefox/0.9.3 ") ; my $cookies = HTTP::Cookies->new(file => './lwp_cookies.dat' , autosave => 1 ,) ; $mech->cookie_jar($cookies) ; $mech->post($url) ; $mech->form_id('Form1') ; $mech->field('LoginControl$FileIDTextBox'=> $username) ; $mech->field('LoginControl$PasswordTextBox'=>$password) ; $mech->submit ('LoginControl$ButtonSignInn') ; print $mech->content() , "\n" ;