From: Dominic Son Date: 2006-07-23T19:24:16+09:00 Subject: Dividing inside iterations? Hi Learning Ruby. Is it possible to divide values while inside an iteration? for example i'd like to do something like this: h = [40,20,50,200] h.each do |num,total| num / 24 = total print "#{total} \n" end as you'd expect, there is an error because of that '/' and '=' sign in this iterator. so since this isn't possible what would be the best way to do what i'm trying to do? or perhaps my syntax is wrong thank you very much. Dominic -- Posted via http://www.ruby-forum.com/.