#!c:\perl\bin\perl -w use HTTP::Request::Common qw(POST); use LWP::UserAgent; $ua = LWP::UserAgent->new; push @{$ua->requests_redirectable}, 'POST'; my $req = POST 'http://www.(mypath)/login.php', [ username => 'masked', password => 'masked' ]; print $ua->request($req)->as_string; exit;