in reply to Re^2: How to perform single operation to each line in filein thread How to perform single operation to each line in file
Why don't you just read the file line-by-line?