From: Mike Keller Date: 2007-01-23T05:56:49+09:00 Subject: Re: Silly Array Question Drew Olson wrote: > > Assuming that the .csv file is coming in as a 2D array and that the text > document is a simple array, this should work: > > csv_array.each_with_index do |row,index| > row << text_array[index] > end The problem with this is that it lists the contents of the two files in this order. 1 2 3 4 repeat when I need it in 1234 1234 1234 1234 Alex Young wrote: > a.zip(b).map{|c| c.flatten} > > I presume that's close enough :-) This causes a different problem, what this does is format the output like: 123 4 repeat I believe that has to do with the new lines in the file. I'm not certain how to strip those out. Or how to get around the fact that they are there. -- Posted via http://www.ruby-forum.com/.