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;
}


Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
 
Logged IP: 3.235.85.115
To prevent spam please submit by clicking the kitten: