in reply to Re: How to differentiate hash reference and object reference?
in thread How to differentiate hash reference and object reference?

No, don't do that. ref is broken:

perlfunc in bleadperl recommends several other techniques for doing the same thing without the problems.

Replies are listed 'Best First'.
Re^3: How to differentiate hash reference and object reference?
by diotalevi (Canon) on Aug 31, 2005 at 17:46 UTC
    You can also fool ref() by blessing your objects into the "\0" package. In that case, you'd get a false value on something that is not only a ref but is even blessed.
Re^3: How to differentiate hash reference and object reference?
by davis (Vicar) on Aug 31, 2005 at 18:08 UTC
    Oh, didn't know that. Thanks!

    davis
    Kids, you tried your hardest, and you failed miserably. The lesson is: Never try.