Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Don't ask to ask, just ask
 
PerlMonks  

Re: Cookie Problem

by omega_monk (Scribe)
on Jun 10, 2005 at 12:00 UTC ( [id://465588]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Cookie Problem

Not necessarily the solution, but you should be using
use strict; # and this really helps DURING development. use CGI::Carp qw(fatalsToBrowser);
I tried setting '$ENV{'QUERY_STRING'} = "test";' before the blockquote, and it printed as expected, so not sure yet why(my own ignorance, per usual, but the only way to learn) why $ENV{'QUERY_STRING'} is not being set...

update: I took your original code, and swapped
$exit_link = "$ENV{'QUERY_STRING'}"; # for $exit_link = "Perlmonks rocks.";
after a refresh it pulls up properly. So I gather that you cannot view the cookie contents the same time that you put it, and $ENV{'QUERY_STRING'} is empty(which makes sense now because there was no REQUEST).

update(2); Spelling...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://465588]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.