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|
        while somedigit = file.gets
                puts "SQL STATEMENT I MADE UP ='"+somedigit+"'"
        end
end

OUTPUT:
-----------------------------------------------------------------
SQL STATEMENT I MADE UP ='000017383712
'
SQL STATEMENT I MADE UP ='000017383738
'
SQL STATEMENT I MADE UP ='000017384033
'
SQL STATEMENT I MADE UP ='000053598777
'

OUTPUT should look
like:-------------------------------------------------
SQL STATEMENT I MADE UP ='000017383712'
SQL STATEMENT I MADE UP ='000017383738'
SQL STATEMENT I MADE UP ='000017384033'
SQL STATEMENT I MADE UP ='000053598777'
-- 
Posted via http://www.ruby-forum.com/.