This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add UCD::num() to get safe numeric value of a string
This function will return the numeric value of the string passed it,
and undef if the entire string has no safe numeric value.
To be safe, a string must be a single character which has a numeric
value, or consist entirely of characters that match \d, coming from the
same Unicode block of digits. Thus, a mix of Bengali and Western
digits would be considered unsafe, as well as a mix of half- and
full-width digits.