in reply to The instance/type of a variable

You can use ref for some of that:
if ( ref( $your_var ) =~ /HASH/ ) { ... }
or in more draconian fashion
if ( ref( $your_var ) eq 'HASH' ) {...}
It won't tell you whether a scalar is a string or a number.

Phil