On Jul 23, Mads N. Vestergaard said:
I'm trying to check weather a variable is an integer, i have tried the
following:
use Math::BigRat;
my $x = 42;
print "$x is an integer\n" if $x->is_int();
Using Math::BigRat doesn't automatically make numbers into objects. You
Hi everybody,
I'm trying to check weather a variable is an integer, i have tried the
following:
use Math::BigRat;
my $x = 42;
print "$x is an integer\n" if $x->is_int();
But it doesn't work, it gives me the error:
Can't call method "is_int" without a p