Here is what I use on www.extremeunicycle.com and www.marylandwizards.org
<--code-->
#read cookie
$cdata = $ENV{'HTTP_COOKIE'};
($cookie, $value) = split(/=/,$cdata);
$cexist = index($cdata,"extremeunicycle");
#set cookie
$cname="extremeunicycle";
$expdate = "Tue, 28-Nov-2000 20:30:34";
print "Set-Cookie: NAME=$cname; expires=$expdate\n";
<--code-->
The set cookie should go before any html print statements, even:
print "Content-type:text/html\n\n";
hope that helps, if not let me know and I'll see what I can do.
<--Original Message-->
Message: 3
Date: Tue, 21 Nov 2000 16:58:53 +0000
To: [EMAIL PROTECTED]
From: Roland Corbet <[EMAIL PROTECTED]>
Subject: Cookies, HTTP::Cookies and Perl
Does anyone know where I might be able to find out some example of how to
use cookies with Perl? I have looked in the docs at HTTP::Cookies, and
tried to put together a few examples but with no luck. I find the docs a
bit hard to follow without any 'real' examples.
Does anyone have any examples of HTTP::Cookies in action? Maybe even some
simple routines like I have in Java - Getcookie, Setcookie etc.
Some samples of creating, reading, and deleting would be ideal.
Many thanks in anticipation of your help.
Roland
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web