in reply to Re^2: Peculiar hash behavior
in thread Peculiar hash behavior
The array emulation is another one of those things I've read about a few times and never really understood well enough to be safe around :-) .
is short for$h{$x, $y, ...}
$h{join $;, $x, $y, ...}
That's it.
As long as your keys don't contain the value in $; (which is a control character by default), you can emulate multi-level hashes. It presumably uses less memory, but it might be a bit slower from concatenating the keys??? Of course, you're relying on the value of $; being safe.
|
|---|