i think your problem is here:
} elsif ($code) { my $cookie_to_send = cookie(-name=>'test' -value=>"$code", -expiration=>'+1h'); # print out header print header(-cookie=>$cookie_to_send); print "You had a cookie!<br>"; print "Code: $code<br>"; print "Cookie: $cookie";
"You had a cookie!" is false. they didn't have a cookie. that's why you just set one. you can't read the cookie you set until they visit the page (or another that checks for the cookie) again.
In reply to Re: Re: Re: A rotten cookie
by thraxil
in thread A rotten cookie
by sulfericacid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |