#!/usr/bin/perl use WWW::Mechanize; my $mech = WWW::Mechanize->new(autocheck => 0, autodie => 0); $mech->agent('wonderbot/JS 1.0'); $mech->cookie_jar(HTTP::Cookies->new()); $mech->get('https://XXXXX.aspx'); my $email = 'XXXX'; my $password = 'XXXX'; my $org_id = 'XXXXXX'; $mech->form_id('loginForm'); $mech->field('sUserName' => $email); $mech->field('sPassword' => $password); $mech->field('sParentUID' => $org_id); #$mech->field('__EVENTVALIDATION' => $__EVENTVALIDATION); #$mech->field('__VIEWSTATE' => $__VIEWSTATE); $mech->click(); $mech->get('https://YYYY.aspx');#going to another link on the same website my $html_string = $mech->content(); print $html_string;