The above code is useless I know, and not in the context of which I am using it. But it does illustrate my Q perfectly.#!/usr/bin/perl -w use strict; use warnings; use CGI qw(:header); use CGI::Cookie; # Create a new cookie my $c = new CGI::Cookie; $c->name("MY_COOKIE"); $c->value("blah"); # Print a html header with the cookie info print header( -cookie=>[$c] ); # Find the value of the cookie we just created my %cookies = fetch CGI::Cookie; if ($cookies{'MY_COOKIE'}) { print $cookies{'MY_COOKIE'}->value; } # end-if exit;
In reply to When are cookies created? by rsiedl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |