You're dealing with uniqueness. Unless you have a specific reason for not using hashes (such as your items don't stringify correctly), use hashes. They exist for a reason. (Several, actually, but who's counting?)
Alternately, someone has already solved this with Set::Object.
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?