if (exists $myhash{$key}) { ... }
This will avoid the "autovivication" of the hash element. However, I'm a bit confused: Your check might create the element, but it would give it an undefined value. So the next time you perform your check you should get the same value. --Dave
In reply to Re: Presence of Key in Hash of Arrays
by dpuu
in thread Presence of Key in Hash of Arrays
by insensate
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |