in reply to TokeParser

Is there any way to write the if statement above to screen for just a single or two digit number or to somehow exclude text that contains decimal points?

You can exclude numbers with decimal points using something like this, which will work no matter what else is going on around the numbers in a particular text string:

print "$text\n" if ( $text =~ /[^.\d]?\d{1,2}[^.\d]?/ );
This way, if there is any character before and/or after a one- or two-digit number, the character must not be a period. (update: added "\d" inside each of the bounding character class specs, to make sure we don't match 3 or more digits.)