my $object = whatever; my $method = whatever; if($object->can($method)) { print "Has method $method\n"; } else { print "Has no method $method\n"; }