Use the built-in Scalar::Util module's blessed() function.
In reply to Re: Retrieving classname from an object by chromatic in thread Retrieving classname from an object by monkeyhelper