Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Crumby cookie

by blaze (Friar)
on Nov 21, 2002 at 01:11 UTC ( [id://214677]=note: print w/replies, xml ) Need Help??


in reply to Crumby cookie

I used your code to set ( i just added use strict and warnings) and mine to read and it worked fine
#!/usr/local/bin/perl -w # # this is a file i named set.cgi # # use strict; use CGI; my $q = new CGI; my $cookie_out = $q->cookie(-name=>"wolves", -value=>"cookieinfo", -expires=>'+24h'); print $q->header(-cookie=>$cookie_out); my $cookie_in = $q->cookie("wolves"); print $cookie_in;


#!/usr/local/bin/perl -w # # this is my code, i named it read.cgi # # use CGI; use strict; print "Content-type:text/html\n\n"; my $q = new CGI; my $cookie_in = $q->cookie('wolves'); print $cookie_in;
both pages displayed the word "cookieinfo", do you get something different?
-Robert

Replies are listed 'Best First'.
Re: Re: Crumby cookie
by wolverina (Beadle) on Nov 21, 2002 at 01:52 UTC
    I copied your code exactly into 2 scripts and ran them. The first script works fine.. but the second scripts prints nothing on the screen. As i stated before, if i put both the output and input cookie lines on the same script, hitting reload does print the the value of cookie_in when i hit reload. It's when i split it into 2 scripts that the second script does nothing. Bummer. -Lisa
      PS.. i know the cookie is landing on my hard drive, cause i see it arriving in my cookie folder. The second script just isn't reading or seeing it for some reason. When i modify the script, i delete the cookie and watch it appear again when i run the script.. i must have deleted it a 100 times. -Lisa

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://214677]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2024-03-28 19:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found