use Scalar::Util::Numeric qw(isfloat); my $var = shift || 0E0; print "'$var' is "; print "not " unless isfloat($var); print "a float\n";