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 reply to Re: Setting and Reading Cookies
by gryphon
in thread Setting and Reading Cookies
by bigjoe11a
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |