use WWW::Mechanize; $username = "xxxx"; $password = "xxxx"; my $mech = WWW::Mechanize->new(); $mech->cookie_jar(HTTP::Cookies->new()); $mech->get( "https://sample" ); $mech->submit_form( form_name => "login", fields => { j_username => $username, j_password => $password}, ); $mech->submit(); $mech->save_content( "xxx.html" ); end;