There is a
LWP::Authen::Digest module that does HTTP Digest authentication.
LWP::UserAgent should automatically retry the request after calling the authentication handler when the server asks for authentication. The client code needs to set the username and password. Either by calling
credentials</cod> or overriding <code>get_basic_credentials to prompt the user.
$ua = LWP::UserAgent->new();
$ua->credentials($host, $realm, $user, $pass);
$ua->request($req);