samnodes has asked for the wisdom of the Perl Monks concerning the following question:

I am using lwp-request in Active Perl to GET and then process web pages on XP. I have used this before with no problem. I call open (INFILE,"lwp-request GET ${url} |") to set up a pipe which I then process with while (<INFILE>). If I run the perl script from a command window then all is well. However, if I run it via cgi-bin, lwp-request doesn't seem to pick up the web page, just a short page which seems to contain Javascript routines. Am I missing something obvious here? $url = "http://www.guardian.co.uk/cartoons/stevebell/archive/0,,1284265,00.html" in this case.

Replies are listed 'Best First'.
Re: lwp-request problem
by Anonymous Monk on Sep 18, 2006 at 06:05 UTC
      use LWP::simple; and get() works fine! thanks. But why does it work?
Re: lwp-request problem
by derby (Abbot) on Sep 18, 2006 at 12:37 UTC

    Maybe not so much a permission problem but a path problem. What does this call look like from the command line: GET 'http://www.guardian.co.uk/cartoons/stevebell/archive' Is that the javascript you're talking about?

    -derby