in reply to LWP::UserAgent always complains about Hostname
Similar problem with my own LWP::UserAgent script and the hearse package on Ubuntu. In my case the solution lay in my /etc/hosts file. I had a lot of troublesome sites aliased to 127.0.0.1, each on a separate line. At some point (probably hitting the "hosts" tab of the network manager applet) all these separate lines got rolled up into one really long line. Replacing the long line with 127.0.0.1 localhost fixed the problem. Looks like the ns library chokes with really long lines in /etc/hosts, which causes a knock-on failure with Perl's resolver.