From: Edward QU Date: 2012-09-15T12:57:54+09:00 Subject: how to write a array into a string Hello all I have a array, this is a information queue,I want to send it as the content of email line by line. my script is as the following: str=msg_queue.each_with_index do |msg, index| puts "#{index} : #{msg}!"end sendemail(from,to,titel,str) but, in the email, i got the content is a array format, ["[2012-09-15,Sat,11:53:41] No this month log file, created itddfafafad", "[2012-09-15,Sat,11:53:41] No this month leeog fil", "[2012-09-15,Sat,11:53:41] No this month leeeog fil", "[2012-09-15,Sat,11:53:41] what i wanted is as the following: 0 : [2012-09-15,Sat,11:53:41] No this month log file, created itddfafafad! 1 : [2012-09-15,Sat,11:53:41] No this month leeog fil! 2 : [2012-09-15,Sat,11:53:41] No this month leeeog fil! 3 : [2012-09-15,Sat,11:53:41] No this month lodd666666666666666666ddddgeee fil! any help would be very appreciated. Regards Edward. -- Posted via http://www.ruby-forum.com/.