From: Snoopy Dog Date: 2007-04-27T12:16:51+09:00 Subject: Re: Date Format Change - Help request Dan Zwell wrote: > Hi, > > the #each method does not modify the contents of the item that is being > looped over. I would use #map. You have the data you want to modify on > this array, so call data.map {|row| ...} and do your text transformation > inside the block. The last line is what counts, so to transform data[] > as you have described, the last line in the block should be 'machine + " > , "+ date + " , " + newdate', you don't need "puts" or anything. > > Dan > THANK YOU DAN I ended up using data.map! (|row| as the control and added the line machine + ", " + newdate + ", " + produced as the last line in the block to get my desired result. Thanks for your help -- Posted via http://www.ruby-forum.com/.