From: huang zhimin Date: 2007-05-17T16:46:22+09:00 Subject: Re: Problem removing new line characters on Mac OS X ------=_Part_22141_20909022.1179387981272 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 5/17/07, Singeo wrote: > > Hi, I'm pretty new to Ruby. I've got a text file where I need to > remove some new line characters. I've tried everything I can think of > to do this with no success, including: > > line.gsub!("/r","") ~~ \r line.gsub!("/n","") ~~\n line=line.chomp > > I can't seem to get the new line character to be recognised and dealt > with. Any advice appreciated. > > Thanks > > > try it -- http://sourceforge.net/projects/mycodeline/ ------=_Part_22141_20909022.1179387981272--