Why would you want to use an array reference as a hash key? The point of a hash is to have a key to quickly and easily access data in a non-sequential manner. Using an array reference doesn't seem to facilitate that (of course, I'm not sure what you're trying to accomplish). If you want, you can take an array's reference and by using the stringified value as a hash key, you can get a one-to-one mapping, but this really strikes me as something to be avoided without good reason.
So, the question is, what problem are you trying to solve?
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
In reply to (Ovid) Re: array reference as hash key
by Ovid
in thread array reference as hash key
by smgfc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |