in reply to Bad hostname
Are you sure your CGI script (Apache) has permissions to run your LWP script?