Stefano, Thanks for your reply! I want to write the modified data to another file. Your solution was terrific! I should have been clearer in the initial post about the long row of numbers. That shouldn't have been part of the data sample, as its purpose was to document character spacing. Thanks for the alternate solutions too. You've provided this ruby newbie with lots of valuable tidbits! Paul -- Posted via http://www.ruby-forum.com/.