Cookies must be set before content header so if you take out your first print "Content-Type: text/html\n\n"; and your code should work (barring any other errors of course)
However to echo what hardburn was saying the CGI module has functions that not only will handle your cookies and your headers, but can also help you to create forms and retrieve them.
You seem new here to Perlmonks so I'll give you the standard stuff: you should always use strict; (See Why you should use strict) and while testing its also a good idea to use warnings;, also for web programming see use CGI or die;, to learn lots of things about CGI and why its a good idea.
Lobster Aliens Are attacking the world!In reply to Re: Help to eat cookie
by cfreak
in thread Help to eat cookie
by webstudioro
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |