This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.