in reply to Determining contents type of a Scalar

See ref subroutine.
perldoc -f ref