sub IsNumeric { my $val = shift; if ( defined $val ) { return $val =~ /^\d+$/ ? 1 : 0; } else { warn "IsNumeric requires an argument!"; } }