in reply to Re: To Hash or to Array--Uniqueness is the question.
in thread To Hash or to Array--Uniqueness is the question.

Tie::RefHash can be used to allow references to be used as keys. I use it to allow the use of filehandles as a key, without losing their magic.
  • Comment on Re^2: To Hash or to Array--Uniqueness is the question.

Replies are listed 'Best First'.
Re^3: To Hash or to Array--Uniqueness is the question.
by sauoq (Abbot) on Dec 03, 2005 at 01:49 UTC

    Sure, but in the context of this question—which is about dealing with uniqueness—that's not likely to be very helpful. Unless, of course, the uniqueness of the reference itself is sufficient. But if you have, say, my $a = [1]; my $b = [1]; and want to insert them into a store only if an identical structure doesn't already exist in that store... Tie::RefHash probably won't help because you'll need to do a 'deep' compare.

    -sauoq
    "My two cents aren't worth a dime.";