in reply to Re: Why does testing a key create a hash?
in thread Why does testing a key create a hash?
Use if exists $hash->{1} instead.
Nope, that will still cause $hash to become a hashref and print 1 if $hash; will print 1. exists takes a hash element, and you can't have a hash element without a hash! :)
|
|---|