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
In reply to Re^2: unicode string comparison (perl 5.26)
by afoken
in thread unicode string comparison (perl 5.26)
by md351
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |