I have several line of numbers for which I need to extract the single digits. All numbers are separated by spaces. Example: 28 5 29 29 5 5 27 30 5 29 34 34 34 33 29 5 30 34 34 34 33 34 34 34 34 33 34 33 34 34 34 30 26 33 34 33 26 32 33 33 33 33 34 33 33 34 33 26 33 33 33 33 32 31 34 32 33 32 5 4 7 8 3 6 8 4 33 31 33 33 27 33 30 5 30 32 26 4 As you can see there is a set of single digits nested within the string 5 4 7 8 3 6 8 4. these numbers will change and it does not matter what the numbers are as long as they are single digits. I can match that by doing m/\s\d\s\d\s\d\s\d\s\d\s\d\s\d\s\d/ But the number of single digits that are strung together will also change, and I would like to specify that as a variable. I want to do something like this: m/<\s\d\s>{$t,}/ but that of course won't work. I want to be able to change $t to various numbers without changing the script. Any help with this would be greatly appreciated. I do not think using the word boundaries will work because they are digits and