in reply to An interesting oddity with hashes
perhaps i'm dense, but i don't see how this gives you any more multidimensional functionality than hashes of hashes, e.g.:
$hash{6}{times}{9} = 42; $hash{2}{plus}{2} = 5;
the one thing i often find i want to do with the hash-of-hash notation that i can't, easily, is make slices that keep their shape via place-holders, like:
$hash{0}{plus}{0} = 0; $hash{0}{plus}{1} = 1; $hash{1}{plus}{0} = 1; $hash{1}{plus}{1} = 10; %plus = %hash{}{plus}{}; # (or something like it) # should yield: # $plus{0}{0} = 0; # $plus{0}{1} = 1; # $plus{1}{0} = 1; # $plus{1}{1} = 10;
or something like that. hash-wise hash slices. but i don't see your trick helping, there.
|
|---|