From: pat eyler Date: 2012-05-01T04:41:19+09:00 Subject: Re: Writing a file to txt, how can I put a new line? --e89a8fb2065e4ab01a04beeaa3b8 Content-Type: text/plain; charset=ISO-8859-1 You might want to look at puts. Or maybe one of the logging libraries that solve logging for you (more or less) On Mon, Apr 30, 2012 at 1:31 PM, Christopher D. wrote: > I would like to create an error log for a application I have made. Here > is my basic error log creator. > > My question: How do I get each part of the array on a new line? > > > File::open( "Tal Creator Log" + ".txt", "w" ) do |txt| > txt << "Finished Appending, the new files and a log is located in > P:\\project\\" > txt << "________________ ISSUES __________________" > DNErep.reduce { |x| puts txt << x } > DNEtemp.reduce { |y| puts txt << y } > end > > I looked on google and SO and didn't find anything about the new line. > > I appreciate all time spent and look forward to your answers. > > -- > Posted via http://www.ruby-forum.com/. > > -- thanks, -pate ------------------------- Don't judge those who choose to sin differently than you do --e89a8fb2065e4ab01a04beeaa3b8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable You might want to look at puts. =A0Or maybe one of the logging libraries th= at solve logging for you (more or less)




-- thanks,
-pate
-------------------------
=A0Don't judge those= who choose to sin differently than you do

--e89a8fb2065e4ab01a04beeaa3b8--