in reply to
Determining contents type of a Scalar
perl.com
lists some possible ways (about midway down). To quote from the article "There are many, many ways to do this. Some even work."
Comment on
Re: Determining contents type of a Scalar
In Section
Seekers of Perl Wisdom