in reply to Setting and Reading Cookies
Greetings bigjoe11a,
I recommend you read through the CGI.pm manual's section on cookies. To write a cookie, just print the header of a page with a cookie object.
use strict; use CGI; my $cgi = new CGI; my $cookie = $cgi->cookie( -name => 'cookieName', -value => 'cookieValue', -expires => '+1h' ); print $cgi->header( -cookie => $cookie );
To read the cookie, just use this:
my $value = $cgi->cookie('cookieName');gryphon
Whitepages.com
code('Perl') || die;
In Section
Seekers of Perl Wisdom