Cheers# +ve int, not inc zero, optional space, optional sign $var1 =~ s/^\s+//; # leading whitespace $var1 =~ s/\s+$//; # trailing whitespace if( $var1 =~ /^[+]?\d+$/ && $var1 != 0 ) { print "+ve int\n"; }
In reply to Re: Check for Positive Integer entry only
by chrism01
in thread Check for Positive Integer entry only
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |