I myself use File.readlines but it seems IO.readlines is doing the same - reading into an array. When you have an array with the data you can just omit part of that array and then store that result. Perhaps there is a more elegant approach to it but it is what I usually do when I store a modified file. -- Posted via http://www.ruby-forum.com/.