in reply to Playing with Cookies
Update: Fixed typo. print \&setCookie; wasn't what I meant. Rather:#!/usr/local/bin/perl use strict; use warnings; use CGI qw/:standard/; use CGI::Cookie; my $query = 'action'; if($query eq 'Login'){ (); } else { setCookie(); } sub setCookie { my $cookie1 = new CGI::Cookie(-name => 'cookie', -value => 'here', -expires => '+3m', -path => '/root/Desktop', ); print "\nSet-Cookie: $cookie1\n"; print "Content-Type: text/html\n"; print '<meta http-equiv="refresh" content="2">', "\n\n"; }
setCookie();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Playing with Cookies
by Anonymous Monk on Dec 23, 2009 at 23:42 UTC |