or download this
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
use strict;
...
$ua->credentials($req->url->netloc, "home.sff.net", 'jonathanmark', 'n
+ottherealpassword');
my$content = $ua->request($req)->as_string;
print "Content is $content";