tsdesai has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to create a new cookie and then delete it later after certain actions. Below is my code that i create cookie
use strict; use CGI; my $q = new CGI; my $cookie = $q->cookie(-name=>'pass', -value=>'xxxx', -expires=>'+1h', -path=>'/'); print $q->header(-cookie=>$cookie);
The above is the pretty much standard code, but the cookie doesn't gets send to the browser. I am not sure why the cookie isn't created. I am going nuts something probably i am missing something silly. I have set the cookies before in different places but not sure why it doesn't work .
Appreciate any help. Thanks, Teju
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: creating and Deleting a new cookie
by kennethk (Abbot) on Jun 26, 2017 at 15:35 UTC | |
by tsdesai (Acolyte) on Jun 26, 2017 at 17:02 UTC | |
by kennethk (Abbot) on Jun 26, 2017 at 17:40 UTC | |
by tsdesai (Acolyte) on Jun 27, 2017 at 06:53 UTC | |
by huck (Prior) on Jun 27, 2017 at 07:29 UTC | |
| |
by tsdesai (Acolyte) on Jun 28, 2017 at 07:33 UTC | |
|
Re: creating and Deleting a new cookie
by talexb (Chancellor) on Jun 26, 2017 at 15:03 UTC |