I want to use a for-each and a counter:
i=0 for blah in blahs puts i.to_s + \" \" + blah i+=1 end
Is there a better way to do it?>
If blahs is a class that mixes in Enumerable, you should be able to do this:
blahs
blahs.each_with_index do |blah, i| puts("#{i} #{blah}") end