Welcome to WebmasterWorld Guest from 22.214.171.124
I'm not an expert in coding Perl, but thanks to my father's insistance on learning BASIC at the age of 7, I'm not too bad at editing scripts and adding a few bits too them (sometimes!)
I have a cookie query.
In one script, I'm using the following code to read a cookie which has been set by a different script:
use CGI qw(header cookie);
$theCookie = $query->cookie('username');
This works fine, and I can use the string '$theCookie' for what I need.
However, when I use the same code in another script, it doesn't work (I get a 500 error) and my host's perl tester gives a response of:
- 255 perl returned nonzero status
Global symbol "$theCookie" requires explicit package name at /kunden/homepages/22/d83025052/htdocs/basenotes/cgi-bin/auction.cgi line 28.
Global symbol "$query" requires explicit package name at /kunden/homepages/22/d83025052/htdocs/basenotes/cgi-bin/auction.cgi line 28.
/kunden/homepages/22/d83025052/htdocs/basenotes/cgi-bin/auction.cgi had compilation errors.
STDOUT OK STDERR OK
ANyone have any ideas as to what would cause it to work in one and not another. Is there a bit of code I've missed?