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 and, 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/", "/cgi-bin/", and "/cgi-bin/customer_service/", but not to the script "/cgi-private/".
(from docs)