# 5.36 - isa - Checking if a var is of some class # old way use v5.36; use Scalar::Util qw(blessed); my $obj = bless {}, 'Butterfly'; if (blessed $obj and $obj->isa('Butterfly')) { say "Butterfly, butterfly"; }