in reply to matching between 1 to 8 digits but not more

Your test should be simply:

if ($Number!~/^[0-9]{1,8}$/) { ## blah blah }


..I'm surprised so many people are having a problem with this.

In English: For anything that doesn't explicitly match a string of numbers, and only numbers, of at least 1 character in length, but no more than 8 characters, do ##blah blah.

Cheers,
Bowie