On 5/31/06, Paul D. Kraus <paul.kraus / gmail.com> wrote:
>
> Itterating over an array and then having to have a counter variable to make
> "in-place" changes seems a little overkill and I am pretty certian there is
> probaly a better way.

%w[a b c d e].each_with_index do |val,idx|
  puts "#{idx} = #{val}"
end

0 = a
1 = b
2 = c
3 = d
4 = e

-- 
Bill Guindon (aka aGorilla)
The best answer to most questions is "it depends".