Showing entries with tag "is_numeric".

Found 1 entries

Perlfunc: is_numeric()

Simple Perl function to tell if a string is numeric.

sub is_numeric {
    if ($_[0] =~ m/^[+-]?\d+(\.\d+)?$/) {
        return 1;
    }

    return 0
}
Leave A Reply