if ($myscalar =~ /HASH/) {print "Is a ref to an object hash\n";} else {print "Is a basic scalar\n";}