http://qs321.pair.com?node_id=16094

Pmint has asked for the wisdom of the Perl Monks concerning the following question:

Without using CGI.pm, can you add to one cookie without another random cookie being created with the same name?
I'm resetting a cookie over and over and sometimes it creates duplicate cookies and sometimes not...
  • Comment on Don't want duplicate cookies with the same name

Replies are listed 'Best First'.
Re: Don't want duplicate cookies with the same name
by Gloom (Monk) on Jan 23, 2001 at 20:57 UTC
    Store your cookies in a hash, sorted by name.
    I think it's a good solution to disallow duplicate entry.
    You can also verify if a cookie already exits with the exists statment.