in reply to Tied Hash to emulate double-key hash only accepts one key
I don't think you need to use anything special like a tie or otherwise for this. The hash key can be an array (not an arrayref), which you can use to emulate multi-key'd hashes without the need for any special coding. See my node An interesting oddity with hashes for more details.
my %hash; $hash{ 3,4 } = "array"; $hash{ 3 } = "three"; $hash{ 4 } = "four"; # no collisions!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Tied Hash to emulate double-key hash only accepts one key
by AidanLee (Chaplain) on Jun 21, 2001 at 22:36 UTC |