use strict; use Data::Dumper; use WWW::Mechanize; use POSIX qw(strftime); my $currSysDate =strftime ("%b".'&year='."%y", localtime); # DAY Language my $mech = WWW::Mechanize->new(autocheck => 1); my $url = "http://www.somenet.com/login.aspx"; my $user = 'user'; my $pass = 'pass'; $mech->get( $url ); if ($mech->success()) { $mech->submit_form( form_name => 'Form1', fields => { txtUsername => $user, txtPassword => $pass, }, button => 'Button3', ); $mech->get("http://www.somenet.com/showCardEmpMonthlyReport.aspx?month=$currSysDate&Reptype=&empcode=$user"); my $str = $mech->content(); print $str; }