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"]]

hth.

-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
===============================================================================