Dec 29, 1999, 5:13 PM
Post #3 of 4
Two (free) cookie libraries are Cookie-lib.pl andHTTP Cookie Lib. Both of these libraries offer detailed information on how to set and delete cookies via your Perl CGI program.
After you install your cookie library and incorporate the cookie-setting functions into your Perl program(s), the information in any of the cookies that you set will be available to all Perl programs you have on your server.
For example, our sister company, YourDomainHost, offers a free month of domain hosting to any of their clients who refer a new client to them. To keep track of who referred who, special links that look like http://yourdomainhost.com/cgi-bin/welcome.pl?perlarchive are used. The welcome.pl program's sole responsibility is to dish out cookies.
So whenever someone clicks on the special link and signs up, the ordering application looks for a cookie, and if there is one,
credits the client who referred them.
Is this the type of cookie usage you're looking for?
Also, if you'd like to try the CGI module, an excellent tutorial is at webreview.com. The tutorial offers line-by-line instructions on how to set cookies using the CGI module.