in reply to print to output problem

You want the print statement outside of your while loop
push (@outLines, $val); } print OUT @outLines;
Otherwise it print the contents of @outLines for each line
HTH

Sweetblood

Replies are listed 'Best First'.
Re^2: print to output problem
by Anonymous Monk on Jul 07, 2004 at 16:36 UTC
    i have multiple entries in my input file to look at, so if i was to print outside the while loop, surely i will only be printing the last loop through the input?
      here is my input file:
      # input for ....find 17th and 18th number # input for .... again Nd RES PDB val 1 140 31 20.0 1 142 33 0.0 1 143 34 10.0 1 144 35 0.0
      say 17th number is 143, would print out 10 on first loop then say 17th number is 140 would print 20 on second