my $var = 2.5; if (int($var) != $var) { print "Is a float\n"; }