Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Problem setting cookie using CGI::Cookie

by Anonymous Monk
on Jun 04, 2003 at 23:41 UTC ( [id://263187] : note . print w/replies, xml ) Need Help??


in reply to Problem setting cookie using CGI::Cookie

In addition, do you make explicit use of CGI::Cookie in the rest of your script somewhere? In looking at the documentation for both CGI::Cookie.pm and CGI.pm, the former is used with a new CGI::Cookie() and the latter is as you've instantiated your cookie in your script. Not that this has anything to do with your problem, but if it doesn't need to be there, take it out. Also make sure your -path attribute in the cookie is correct, since
"For example, if you specify the path "/cgi-bin", then the cookie will be returned to each of the scripts "/cgi-bin/tally.pl", "/cgi-bin/order.pl", and "/cgi-bin/customer_service/complain.pl", but not to the script "/cgi-private/site_admin.pl".
(from CGI.pm docs)