February 2019 Archives

Untrusted Numeric Input -- /[0-9]/

My blog entry of a couple weeks ago, dealt mainly with the problem of ensuring that supposedly-numeric input actually consisted only of ASCII digits. One of the ways to do this was to use the bracketed character class [0-9] instead of \d. This was documented as being portable as of Perl 5.21.5, and I made the statement that "I believe this behavior goes back further ..." This was clearly just hopeful hand-waving, an…

About Tom Wyant

user-pic I blog about Perl.