in reply to Re: Help with LWP::UserAgent server error 500
in thread Help with LWP::UserAgent server error 500

This isn't strictly true. LWP returns a status code of 500 itself to indicate that something didn't happen as planned on the client side. I have seen this issue most frequently when trying to access a site without setting the required proxy envrironment variable that I need in my company.
C:\>get http://perlmonks.com C:\>500 Can't connect to www.perlmonks.com:80 (connect: Unknown error)

If the OP had missed a required proxy setting step then this would explain why they could access the file using a browser (presumably set up to use a proxy) but not the script.

As a general point, it may be useful to use LWP::Debug qw(+); to trace the progress of an LWP transaction.