You have other means of debugging, too:
- Look in your browser's cookie jar if it's stored in there
- If it is, follow the HTTP requests with a network traffic analyzer like wireshark to see if it's sent to the server
- If it is, print the return value of CGI.pm's cookie() sub.
Most likely it will stop to appear at one of these steps. Knowing which step it is might help you to find out what's wrong.