To my initial surprise, the code above printed "We have a hash reference.", even though the hash I've referenced is empty ( ie: no keys and no values ).
No matter how many keys it hash, it's still a hash. ref(\%hash) returns HASH, which is a true value. if (%$hash_ref) will tell you if the referenced hash is empty or not.
In reply to Re: Truthfulness of references
by ikegami
in thread Truthfulness of references
by njcodewarrior
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |