Agreed, just let me add that you have to use locale; if you want these character classes to be locale-aware. This is like setlocale(LC_ALL, ""); in C, but it's only effective in the lexical scope of the declaration.
Update: the POSIX module has an isdigit function, but you have to apply it to a string, not a character code.
In reply to Re^2: character test functions
by ambrus
in thread character test functions
by beginer_in_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |