in reply to Re: Setting referer with HTTP::Request and LWP::UserAgent
in thread Setting referer with HTTP::Request and LWP::UserAgent

That's very cool, so I put it in myscript.pl:
#!/usr/bin/perl -w use strict; use CGI; print CGI->header( -nph =>1, -Referer => 'http://www.northwindtraders.com/login.html', -location => 'www.mydomain.com', );
I get the exact same output from the command line - huge step forward, thanks - but surfing to the script with a browser still produces Internal Server Error.

What am I missing?

Replies are listed 'Best First'.
Re^3: Setting referer with HTTP::Request and LWP::UserAgent
by Anonymous Monk on Mar 07, 2009 at 16:55 UTC
      Actually, I just noticed this before the rest of the output from the command line:

      "Use of uninitialized value in string ne at (eval 3) line 29"

      even though there's no line 29 in my script - what I posted is all there is.

        From "What's wrong with -w and $^W" in perllexwarn: If you use the -w flag in this case, you end up enabling warnings in pieces of code that you haven't written.