> irb(main):005:0> a=%w{foo bar}
> => ["foo", "bar"]
> irb(main):006:0> a.each_with_index {|e,i| printf "%2d %p\n",i,e}
>  0 "foo"
>  1 "bar"
> => ["foo", "bar"]
> irb(main):007:0> a[1]
> => "bar"

Thanks
-- 
Posted via http://www.ruby-forum.com/.