sub is_zero { my $x = shift; ($x == 0 and $x+0 eq "$x" || "$x" != 0+$x) ? 1 : 0; } # is_zero