I'm passed a reference, and I want to know its type. For this purpose, "ref" works on unblessed references, but on blessed references it returns the package name it was blessed with.
$a=[];
print ref $a;
ARRAY
bless $a, 'mytype';
print ref $a;
mytype
How can I get the type?