moritz: It works if I run the script from the command line!
naikonta: Websites are accessible from the browser. The second command you suggested - 'perl -MLWP::Simple -le 'print head "http://www.google.com" ? "OK" : "NO"' - returns OK.
varian: Pinging 'www.google.com' is successful. As for doing it from the CGI environment, I have no idea how to go about it! :-( I'll check it out anyway.
Thanks for the responses. Hope someone will be able to suggest a solution.
Jayanth
Comment on Re: Using LWP::UserAgent to Get Web Pages