sub is_int { my $num = shift; $num == int($num); }