in reply to isAlpha / isNumeric

Just to add fuel to the fire, I'll point out that the concept of "is numeric" is open to a wide variety of interpretation. See the following snippet direct from the Cookbook Recipe 2.1:

warn "has nondigits" if /\D/; warn "not a natural number" unless /^\d+$/; # rejects -3 warn "not an integer" unless /^-?\d+$/; # rejects +3 warn "not an integer" unless /^[+-]?\d+$/; warn "not a decimal number" unless /^-?\d+\.?\d*$/; # rejects .2 warn "not a decimal number" unless /^-?(?:\d+(?:\.\d*)?|\.\d+)$/; warn "not a C float" unless /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/;
Peace,
-McD

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.