s/succinctly/correctly/, then.
| [reply] [d/l] [select] |
No. /\D/ is wrong. It will allow entries which Perl cannot convert to integers in a meaningful way. There are more that two hundred characters which aren't matched by /\D/, but for which Perl cannot do arithmetic.
| [reply] [d/l] [select] |
Oh, my bad, then. I only assumed* that perl could handle all the unicode digits numerically. That is a very unfortunate state of affairs.
Update: I'm still inclined to think that \d is "correct", in the sense that a program should be able to handle all digit characters as numeric digits, and that perl's failing to do so is a bug, around which I'd prefer not to hack. Maybe someday perl will be fixed in this regard. But maybe I'm being too blithe due to the fact that I've never personally encountered a situation where a character passed a \d test and subsequently caused an error because the program tried to use it as a numeric digit. If I ever do run into a situation where that could be a problem, I'd map any "upper" unicode digit characters in the input down to [0-9] before doing the \d test.
| [reply] [d/l] [select] |