Ben wrote: > I've been trying to write a program that will take a file, do some > find/replace operation and save the file. I'm pretty new to ruby, and I > can't seem to figure out how to do this succinctly. This is my latest > attempt, but it seems like I shouldn't need to open the file twice. Have you considered doing it all from the command line? % ruby -pi -e 'gsub /pattern/, "replacement"' file1 file2... -- Glenn Parker | glenn.parker-AT-comcast.net | <http://www.tetrafoil.com/>