http://www.perlmonks.org?node_id=774077


in reply to quick LWP question

From the LWP::UserAgent POD:
The $netloc is a string of the form "<host>:<port>". The username and password will only be passed to this server
$netloc being the first param to credentials. So you need to remove the path and the preceding "http://" from the first param, and just use "hostname.domain.com:80".