On Thu, Sep 17, 2009 at 8:51 PM, Mrmaster Mrmaster <mrsolarlife / gmail.com> wrote: > Hello, > > I have a small script which reads each line from a txt file and appends > it to the puts statement. My problem is that the last single quotation > mark appears on a new line. How would I make it appear on the same line. > I have am completely lost and would appreciate the help. Thanks > > File.open("directory") do |file| > ¨Βθιμε σονεδιηιζιμε®ηετ p somedigit > ¨ΒυτΆΣΡΜ ΣΤΑΤΕΝΕΞΝΑΔΕ ΥΠ ½§Ά«σονεδιηιτ«Ά§> ¨Βξδ > end I think this will give you a clue on what's going on, and how to move on: File.open("directory") do |file| while somedigit = file.gets somedigit.chomp! puts "SQL STATEMENT I MADE UP ='"+somedigit+"'" end end In summary, gets returns the \n at the end of the line, so you should remove it. Hope this helps, Jesus.