rsiedl has asked for the wisdom of the Perl Monks concerning the following question:
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: When are cookies created?
by davorg (Chancellor) on Nov 16, 2004 at 14:50 UTC | |
|
Re: When are cookies created?
by TedPride (Priest) on Nov 16, 2004 at 16:19 UTC |