Hello Hash Honchos,
I have a subroutine which returns a hash, except when things go wrong, in which case it returns undef. I then want to test the result to see what happened:
my %hash = getHash(); if (%hash == undef) { print "undef\n"; } else { print "not undef\n"; }
Those of you in the know will see that this does not do what I expect. Can anyone enlighten me as to what is going on?
Thanks
In reply to How to have a subroutine return an undefined hash by loris
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |