sub is_integer { return 0 unless defined $_[0]; return $_[0] =~ m/^\d$/ ? 1 : 0 }