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