From: Alex Young Date: 2007-01-23T03:21:18+09:00 Subject: Re: Silly Array Question Mike Keller wrote: > This will probably be a silly question, but I've been searching for > quite awhile now and have been unable to locate how to do this. > > I have two arrays which come from two different files. One is a CSV > file and the other just a list in a text document. > > What I want to do is this. > Take the csv doc. > 123 > 123 > 123 > 123 > a = [1,2,3] * 4 > And the text file. > 4 > 4 > 4 > 4 b = [4] * 4 > > Then turn it into one array that looks like. > 1234 > 1234 > 1234 > 1234 a.zip(b).map{|c| c.flatten} I presume that's close enough :-) -- Alex