From: pat eyler Date: 2012-05-01T05:04:50+09:00 Subject: Re: Writing a file to txt, how can I put a new line? --e89a8f83a1dd4722ec04beeaf7ac Content-Type: text/plain; charset=ISO-8859-1 On Mon, Apr 30, 2012 at 1:59 PM, Christopher D. wrote: > pat eyler wrote in post #1058996: > > You might want to look at puts. Or maybe one of the logging libraries > > that > > solve logging for you (more or less) > > Hi pat, thanks for getting back to me > > The logger isn't exactly what I'm looking for here... just a simple way > to list a few things in my array in a text file line by line instead of > consecutively.. > > I also tried > txt << puts line > txt << "#{puts ""}" > txt << "#{puts line}" > > puts is a method try calling it on your filehandle instead of a default value. (It returns nil, so the three things you tried above won't do what you want.) You probably also learned something else about puts from what those attempts did. > -- > Posted via http://www.ruby-forum.com/. > > -- thanks, -pate ------------------------- Don't judge those who choose to sin differently than you do --e89a8f83a1dd4722ec04beeaf7ac Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Mon, Apr 30, 2012 at 1:59 PM, Christopher= D. <lists@ruby-forum.com> wrote:
pat eyler wrote in post #1058996:
> You might want to look at puts. =A0Or maybe one of the logging librari= es
> that
> solve logging for you (more or less)

Hi pat, thanks for getting back to me

The logger isn't exactly what I'm looking for here... just a simple= way
to list a few things in my array in a text file line by line instead of
consecutively..

I also tried
txt << puts line
txt << "#{puts ""}"
txt << "#{puts line}"



puts is a method try calling it on yo= ur filehandle instead of a default value. =A0(It returns nil, so the three = things you tried above won't do what you want.)

You probably also learned something else about pu= ts from what those attempts did.
=A0
--
Posted via http://= www.ruby-forum.com/.




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

--e89a8f83a1dd4722ec04beeaf7ac--