First off, I need to mention that I'm assuming that you mean you want to send an HTTP cookie, you're using Apache as your web server, and you are writing a CGI script (as opposed to using mod_perl, which would require modules to work).
Second, you should consider using a module, or at least using some code from inside of them, just to avoid typo trouble. At least, write a function to send the cookie and get it tested before you use it much.
Having said that, all you have to do is decide on what your cookie will say (key and value), and in the CGI script, before the "Content-type: text/html\n" line, you will want to print a "Set-Cookie: $Key=$Value\n".
I was able to find an example here.
Have fun!
In reply to Re: Sending cookies without module
by dynamo
in thread Sending cookies without module
by FeraliX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |