From: Navindra Umanee Date: 2005-02-05T07:05:51+09:00 Subject: iteration the ruby way Hi, I have a question about The Ruby Way. Pickaxe gives the following example for using iterators in Ruby: a = [ "a", "b", "c" ] a.each {|x| print x, " -- " } This outputs: a -- b -- c -- But what if I want to print "a -- b -- c"? What's the proper Ruby way of doing that? Is there some way of detecting the last element? I mean, obviously I can do it with a for/while loop or something... Thanks, Navin.