$ua = LWP::UserAgent->new(); $ua->credentials($host, $realm, $user, $pass); $ua->request($req);