morgon has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
Sorry for being too lazy to read the documentation, I am sure I would find my answer here...
But I just spend 15 minutes (or more) on a bug where I wrote
where I should have writtenif($hash{key}) {
so my problem is the automatic stringification of hash-keys that prevents such a but to be discovered at compile-time.if($hash{$key}) {
Plenty of times this is exactly what I want, but sometimes (as here) it can conceal bugs - so is there a way to turn it off, so that accessing a hash-element via bareword would be a compiliation error?
I am sure there is...
Many thanks!
Back to
Seekers of Perl Wisdom