There's more than one way to do things | |
PerlMonks |
Re^3: Peculiar hash behaviorby LanX (Saint) |
on Oct 02, 2021 at 19:07 UTC ( [id://11137202]=note: print w/replies, xml ) | Need Help?? |
> 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 :-) . I think it helps to know that Perl4 had no references˛, so none of the - now normal - nested data-structures described in perldsc were available. With the introduction of Perl5 multi-dim hashes had to be kept for backwards compatibility, but are for most an unknown or obscure feature. But they are quite handy sometimes, you'd be surprised how many people tend to reinvent something like $h{ join(",",@dims) }= "x" which is essentially the same without a safer separator.° HTH! :)
Cheers Rolf °) a former boss was particularly proud to show me his "genius" trick to safe memory ... ˛) a lot had to be achieved with *type-globs (yuck)
In Section
Seekers of Perl Wisdom
|
|