Depending on what you want you will need to use ref or reftype (which is in Scalar::Util, a core module). If the reference is an object, ref will return the class of the object instead of the underlying reference type, reftype will always return the underlying reference type.
if (ref $var eq ref {}) {
print "$var is a hash\n";
}
use Scalar::Util qw/reftype/;
if (reftype $var eq reftype {}) {
print "$var is a hash\n";
}