bigup401 why would you expect "delete" as in https://metacpan.org/pod/CGI#Deleting-a-parameter-completely to touch cookies?
Here is followup to cgi101
sub NoCookiesNoMore {
my( $q, $url ) = @_;
my @names = $q->cookie;
my @coo =
map { $q->cookie( -name => $_, -value => [], -expires => '-10y',
+ ) }
@names;
$url and return $q->redirect( -location => $url, -cookie => [@coo]
+ );
return $q->redirect( -cookie => [@coo] );
} ## end sub NoCookiesNoMore
__END__
$ perl GoToWellwithCookiesNoMore.cgi
Status: 302 Found
Set-Cookie: 1=; path=/; expires=Sat, 14-May-2005 02:28:08 GMT
Set-Cookie: ro=; path=/; expires=Sat, 14-May-2005 02:28:08 GMT
Set-Cookie: 3=; path=/; expires=Sat, 14-May-2005 02:28:08 GMT
Set-Cookie: 5=; path=/; expires=Sat, 14-May-2005 02:28:08 GMT
Date: Tue, 12 May 2015 02:28:08 GMT
Location: http://localhost