From: Mk 27 Date: 2009-05-25T03:56:54+09:00 Subject: Re: Inserting a counter into a .each loop string = "hello world" x = 0 string.each_byte do |c| x+=1 end puts x -- Posted via http://www.ruby-forum.com/.