This seems to satisfy the requirement -- '12345678' and '123456' don't print; '12345654321' does.if($Number =~ m/^\d{1,8}$/){ $N = $Number; } else { print("line has more than 8 digits!\n"); }
----
I Go Back to Sleep, Now.
OGB
In reply to Re: matching between 1 to 8 digits but not more
by Old_Gray_Bear
in thread matching between 1 to 8 digits but not more
by ozgurp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |