Also need to make sure there is nothing after the digits:
while (<>) { chomp; if (/^\d+$/) { print "$_ is an integer\n"; } }
In reply to Re^2: using int and the range function
by RonW
in thread using int and the range function
by Melderon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |