Since a developer can override stringification this isn't safe in general I'm afraid.
Take a look at the blessed function in Scalar::Util. It does exactly what it says on the tin.
In reply to Re: stringified references
by adrianh
in thread stringified references
by rir
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |