in reply to Re: Cookie Reading Problem
in thread Cookie Reading Problem

Hmmm.. that might be the problem. Does that make a difference? I can't remember at the moment, but I think i did not specify the domain name in the cookie when I set it. Does the CGI module automatically set it, if you don't specify one?

Replies are listed 'Best First'.
Re^3: Cookie Reading Problem
by rnewsham (Curate) on Jun 27, 2013 at 15:50 UTC

    Below is an extract from the documentation for CGI which should clear things up. See the full documentation at HTTP COOKIES for full details.

    " a domain This is a partial or complete domain name for which the cookie is valid. The browser will return the cookie to any host that matches the partial domain name. For example, if you specify a domain name of ".capricorn.com", then the browser will return the cookie to Web servers running on any of the machines "www.capricorn.com", "www2.capricorn.com", "feckless.capricorn.com", etc. Domain names must contain at least two periods to prevent attempts to match on top level domains like ".edu". If no domain is specified, then the browser will only return the cookie to servers on the host the cookie originated from."

      Yes, that was the problem - the cookie was set at www.mysite.com, and I was trying to read it at mysite.com. Thanks so much!