in reply to Re^2: Help tightening up a subroutine please
in thread Help tightening up a subroutine please
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.
|
|---|