From: James Edward Gray II Date: 2007-04-08T00:27:06+09:00 Subject: Re: read data line by line On Apr 6, 2007, at 11:51 PM, Krishna Vutukuru wrote: > could anybody please give me an example of how to read data from a > text > file line by line so that manipulations can be made on each and > everyline and copy those to other file? File.open("output.txt", "w") do |output| File.foreach("input.txt") do |line| # change line here... output << line end end Hope that helps. James Edward Gray II