How can I tell if a site either does not accept cookies or has been given the option to accept my cookie and has declined. I have the following code that works great - but I've run into a problem with those that choose to forgo my cookie.
sub cookietest{
my $cookname = "newcookie";
my $cookietest = CGI->cookie($cookname);
unless (defined $cookietest) {
my $cookie1 = CGI->cookie(-NAME=>$cookname,
-VALUE=>"abc",
-EXPIRES=>"+2y",
-PATH=>"/");
print CGI->header(-COOKIE => $cookie1);
}
}
I don't know how to re-request the cookie. Just redoing
my $cookietest = CGI->cookie($cookname); does not work because I've already gotten the page.
Thanks in advance!