if (@an_array) { print "has array elements\n" } if (%a_hash) { print "has hash members\n" }
When used on a hash element, it tells you whether the value is defined, not whether the key exists in the hash. Use "exists" for the latter purpose.
In reply to Re^3: Help tightening up a subroutine please
by gaal
in thread Help tightening up a subroutine please
by mdunnbass
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |