False negative: Bless your hash(ref). False positive: Bless you arrayref into "Tie::NotHASH".
You appear to be confusing the return value of ref with the default stringification of a reference.
But be aware that objects can override stringification and non-hash objects can override "hash dereference". This is why Data::Diver mostly uses eval to test for whether something can be used as a hash reference.
- tye
In reply to Re^4: Testing a key creates a hash (ref--)
by tye
in thread Why does testing a key create a hash?
by johnnywang
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |