Re: FAQ 4.69 How can I use a reference as a hash key?



PerlFAQ Server <brian@xxxxxxxxxxxxxx> wrote:
--------------------------------------------------------------------

4.69: How can I use a reference as a hash key?

(contributed by brian d foy)

Hash keys are strings, so you can't really use a reference as the key.
When you try to do that, perl turns the reference into its stringified
form (for instance, "HASH(0xDEADBEEF)").

Moo!

--
Steven O'Neill steveo@xxxxxxxxx
Brooklyn, NY http://www.panix.com/~steveo
.



Relevant Pages