Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Don't want duplicate cookies with the same name

by Pmint (Initiate)
on Jun 02, 2000 at 22:52 UTC ( #16094=perlquestion: print w/replies, xml ) Need Help??

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

Without using, 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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://16094]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2020-06-03 23:26 GMT
Find Nodes?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?

    Results (29 votes). Check out past polls.