in reply to Removing cookies

above is ok for removing cookie at end of browser session
if however you want the cookie to expire on script completion try sending the cookies value as '' in the header with same name
my $cookie = new CGI::Cookie(-name=>'cookie',-value=>''); print $q->header(-type=>'text/html', -cookie=>$cookie );
im not sure about by domain either.. although a perl script on a domain can only effect those cookies set by that domain as far as i can recall

Replies are listed 'Best First'.
Re: Re: Removing cookies
by cbro (Pilgrim) on Jun 30, 2003 at 20:56 UTC
    Not setting an expire at all is good for deleting cookies when the browser session ends. Setting expire to a negative value will delete the cookie during the current browser session if it has been set at some other time (or during the current session). Either way, I realized after I posted that the author of this node most likely knows this already, and is only interested in deleting by domain name.