in reply to Is a integer or string.

my $equal = $x eq $y || eval { use warnings FATAL => qw( numeric ); $x == $y };

Doesn't check if the either of the values are undef