|Perl: the Markov chain saw
Re: Problem setting cookie using CGI::Cookieby chromatic (Archbishop)
|on Jun 04, 2003 at 23:35 UTC
&url prints a header
You only get to print the header once per invocation. You have to stick the cookie in there before you print it. I'm not having much luck making sense out of your variable names or comparisons, so I can't say for sure that this is your problem, but checking the request method sure looks like it'll print the header too eary to set a cookie.
By the way, calling a sub with the &url syntax is not only ugly, it does things implicitly that you may not want. See perlsub for more. I much prefer url() and recommend that you consider it.