in reply to Re: unicode string comparison (perl 5.26)
in thread unicode string comparison (perl 5.26)
A string is almost certainly an integer if it does not contain any non-digits ("\D").
Almost:
>perl -e 'for ("1", "22", "abc", "1e4", "0xABCD", "") { /\D/ or print +"\"$_\" is an integer\n" }' "1" is an integer "22" is an integer "" is an integer >
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: unicode string comparison (perl 5.26)
by BillKSmith (Monsignor) on Nov 02, 2019 at 18:52 UTC |