Perlfunc: is_numeric()
Simple Perl function to tell if a string is numeric.
sub is_numeric {
my $f = shift();
if ($f =~ /^(\d+\.?\d*|\.\d+)$/) { return 1; }
return 0;
}
Simple Perl function to tell if a string is numeric.
sub is_numeric {
my $f = shift();
if ($f =~ /^(\d+\.?\d*|\.\d+)$/) { return 1; }
return 0;
}