2 ms·
This is why we use strict! The extra arrow is unneeded, as you're working on the actual hash, not a reference to the hash. This is a compiler error with use s
by kbenson 6y ago
This is why we use strict! The extra arrow is unneeded, as you're working on the actual hash, not a reference to the hash. This is a compiler error with use strict though, so it's not something you would generally be bitten with when writing real code, just internet comments. :)
- gbacon 6y agoWhoops, good catch! I had references on the brain. For completeness, that makes it either $nested{$x}{$y}{$z} or after initializing with curly brackets rather than parentheses to construct a new reference to an anonymous hash $nested = { … }; and then use the arrow to dereference as in the grandparent.