Paul wrote in post #1001335: > 2) I'm thinking about getting rid of the initial array and reading > the data straight from the input files. Okay. How about: require 'stringio' str =<<'ENDOFSTRING' "Only one line." "line 1 line 2 line 3" ENDOFSTRING file = StringIO.new(str) $/ = %Q{"\n} #change input line separator file.each do |line| line.chomp!("\n") line.gsub!("\n", ' ') p line end --output:-- "\"Only one line.\"" "\"line 1 line 2 line 3\"" -- Posted via http://www.ruby-forum.com/.