in reply to Collect numbers without the text

If you mean the files look something like this:
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

    Every line will match /\D/ because every line will have "\n" at the end of it. It might help to use chomp, but I'd still wonder how to handle leading/trailing white space, possible decimal numbers, etc.