in reply to Collect numbers without the text
1 2 3 unwanted text 4 5 other stuff not numbers 6 7 8
then something like
while (<>) { chomp; next if /\D/; #will need more accurate regex depending on actual +number format # process the lines that have only numbers }
OTOH, if you mean something else, then you'll need to give an example (which would have been a GoodIdea to begin with).
Udated: per comments by kyle, added chomp and comment that "rejection" regex will depend on ITmajor's real requirements.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Collect numbers without the text
by kyle (Abbot) on Jul 30, 2008 at 17:12 UTC |