K,
It looks as though @INC for you doesn't include a version of perl with LWP::UserAgent.pm installed, whereas @INC for the webserver (usually 'nobody') does use a version of perl with the module.
First off, run this cmd: locate perl | more
That will show you all the places where perl is installed on the machine. My suspicion is that you have two versions of perl installed: 5.8.x is installed for users, and the web server is using some other version. If so, you'll see this kind of thing (minus my comments w arrows):
...
/usr/lib/perl5/5.6.0 <--- version 5.6.0 of perl
...
/usr/local/lib/perl5/5.6.1/CGI.pm <--- diff version
--More--
Edit: I didn't notice that you said the webserver is using 5.005x. Teach me not to read carefully.
You (meaning your user account) seems to be using 5.8.x, which has no LWP::UserAgent.pm installed.
You haven't said why you've decided to test this CGI script by running it from the command line, but you might consider using CGI::Carp, which will send error messages to the browser. And since it will be running as the web server, it will execute using the 5.005x version of perl that has LWP.
Another solution is to remove the 5.8x version of perl from your $PATH variable, and add the 5.005x version. To do so, you'll have to find the 5.005x version--use 'locate perl | grep "5.005" | more; or something similar, and add the path to the 5.005 interpreter to your $PATH.
AH |