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


in reply to Don't want duplicate cookies with the same name

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.