Given that this works:
my $ref = []; my %hash; $hash{$ref} = 1; print keys %hash;
and returns "ARRAY(0x.....)", my question is; is this likely to bring about some tutting and shaking of heads in experienced perl developers?
(Some background: I needed a method of storing which anonymous arrays out of a large number had been examined, and quickly checking that store to see if one had already been examined.)
In reply to Reference as a hash key by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |