Hello,
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