use HTTP::Request::Common qw(POST); use LWP::UserAgent; use LWP::Debug qw(+); my $ua = LWP::UserAgent->new(); $ua->cookie_jar({}); $ua->agent('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)'); my $req = POST 'https://login1.swipnet.se/login.php', [username => 'xxxxx', password => 'yyyyy']; print $ua->request($req)->as_string;