Because if you're merely interested in finding out if the reference is to an instance of some class (as opposed to a hashref, arrayref, ...), what do you put on the other side of the eq? Not to mention the problems with that if you want to gracefully handle subclasses (in which case you really want UNIVERSAL::isa()).
And ++ to xdg; I'd forgotten all about Scalar::Util::blessed. Much better answer than mine.
In reply to Re^4: How to tell if a variable is blessed ?
by Fletch
in thread How to tell if a variable is blessed ?
by jeanluca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |