If you install the Facets gem (the command: "gem install facets") it can be as easy as:
Facets adds the rewrite method to File which makes it easy to do what you want.
A good workman is known by his tools.
Joined: Feb 14, 2006
That's pretty sweet Marc. What I ended up doing was reading the entire file into an array and editing the lines there then re-writing the file .... however what I wanted to do was exactly what you just should me. I will have to play around with that snippet of code. Thanks for showing me.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Question with reading and editing lines in a file