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