use strict; use warnings; use Devel::Peek; use bigint; my $x = "900000000000000000000000000000000000009"; my $y = 900000000000000000000000000000000000009; #Dump($x); # Shows that $x is a simple perl scalar #Dump($y); # Shows that $y is already a Math::BigInt object. my $m = $x - 2; my $n = $x - "2"; if($m == $n) {print "ok\n"} else {print "$m\n$n\n"} # Outputs: # 900000000000000000000000000000000000007 # 9e+038