in reply to Re^2: searching for small Cookies example but found does not work
in thread searching for small Cookies example but found does not work
The code you've showed works for me. The only significant change I had to make was to remove the "www.domain.com" argument from the calls to set_cookie. Perhaps you left it at its default value instead of setting it to your real domain name?
However, I very much second the comments made by the other monks! That is, use a library instead of hand-written code, and use the right line endings (CRLF). I'd add to that: Use strict and warnings. (Also, as an aside, don't use empty prototypes like sub set_cookie() and then call via &set_cookie, which avoids the prototypes. Instead, get rid of the prototype, as in sub set_cookie {..., and then call via the more modern calling style without the &.)
|
|---|