From: dwight schrute Date: 2011-09-13T23:33:58+09:00 Subject: Iterate Array and (pretty)print Hi, I am trying to iterate through an array, convert the output to a string and puts that string. CODE: @hosts = ["test1", "test2", "test3", "test4" puts @hosts.each { |x| print x + "\n" }.to_s CURRENT OUTPUT: ["test1", "test2", "test3", "test4"] DESIRED OUTPUT: However, I want this output to go into an email message, so I'm want to lose the Square brackets and quotes, so it looks like this (and is a string): test1 test2 test3 Any ideas? Thanks. Dwight -- Posted via http://www.ruby-forum.com/.