in reply to Cookies for a Project
Just keep reloading the page to watch it count up.use strict; use CGI; use CGI::Cookie; my $CGI = new CGI; my %cookies = fetch CGI::Cookie; # get the old cookies my $i = 0; $i = $cookies{'i'}->value + 1 if defined $cookies{'i'}; # create new cookie to hold value my $cookie = $CGI->cookie( -name => 'i', -value => $i, ); # and this makes it all work print $CGI->header(-cookie=>$cookie), "i is now $i";
Jeff
R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--
|
|---|