Yes, "$ref" is always the same if $ref= \@array; for the same array. Just go ahead and use it as the key in a hash. This is how Tie::RefHash is able to work.
You can even use $hash{0+$ref} which is probably faster.
- tyeIn reply to Re: Marking an array as already seen (yes)
by tye
in thread Marking an array as already seen
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |