$patent =$value; while (1) { # checking for any non-numeric characters unless ($patent =~ /^[\d]+$/){ print < Data Entry Error
You either entered a patent number with special characters.
Use your browser's BACK option to try again.

ENDERRORCARD next; } last if 1 <= $patent and $patent <= 6009555; print < Data Entry Error

You entered a patent number that was not between 1 and 6,009,555.

Use your browser's BACK option to try again.

ENDERRCARD } # This compares the patent number of the user against US patent number dates