my $foo = bless {}, 'ARRAY'; my $bar = []; print "ooops\n" if ref($foo) eq ref($bar);