http://qs321.pair.com?node_id=263187


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)