in reply to multidimensional hash of array
A simple solution is two concatenate the two keys into one with a seldom used character. In fact, that's what Perl does internally when you give several keys to index a hash:
$myhash{'key1', 'key2'};is equivalent to:
$myhash{join("\x1c", 'key1', 'key2')};ASCII 28 is considered a seldom used character, but you may use another one by changing $;.
Needless to say this is widely considered dirty. davorg's suggestion of using a hash of hashes of arrays is a lot neater.
HTH
--bwana147
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: multidimensional hash of array
by kevyt (Scribe) on May 31, 2001 at 20:26 UTC |