What is the difference between
if (defined $hash{$key}) { }
and
if (exists $hash{$key}) { }
When do I kno
Perl documentation:
When used on a hash element, defined tells you whether the value is defined, not whether the key exists in the hash. Use exists for the latter purpose.