From: "Ara.T.Howard" Date: 2005-07-28T23:00:26+09:00 Subject: Re: Combination of two arrays On Thu, 28 Jul 2005, Ara.T.Howard wrote: > On Thu, 28 Jul 2005, Claus Spitzer wrote: > >> Greetings! >> >> Let me start by clarifying that this is just a request for style >> suggestions... So I won't be hugely disappointed if the plain old way >> works just fine. >> >> I have two arrays. let's call them foo and bar. >> foo = [ "a", "b", "c", ... n ] >> bar = [ 1 , 2 , 3 , ... m ] > > harp:~ > cat a.rb > foo = [ "a", "b", "c", 'n' ] > bar = [ 1 , 2 , 3 , 'm' ] > > p foo.zip(bar) > > harp:~ > ruby a.rb > [["a", 1], ["b", 2], ["c", 3], ["n", "m"]] i'm sorry claus - this obviously does not solve your problem. that's what i get for answering email before coffee. please excuse noise. cheers. -a -- =============================================================================== | email :: ara [dot] t [dot] howard [at] noaa [dot] gov | phone :: 303.497.6469 | My religion is very simple. My religion is kindness. | --Tenzin Gyatso ===============================================================================