From: Kurt Euler Date: 2002-12-20T02:16:24+09:00 Subject: Re: How to specify a record delimiter in a source text file? (Tim ...) Tim: Thanks for your tip, but could you point out how would you would modify the code just below to specify a record separator? IO.foreach("./control/packages.txt") { |x| field = x.chop.split('\t') #do_stuff_here } Lyle Johnson suggested that adding a 2nd parameter specifying after the file name should do the trick, thus: IO.foreach("./control/packages.txt", "some_record_separator_string_here") { |x| field = x.chop.split('\t') #do_stuff_here } I haven't tried this yet, but is this what you mean too? Thanks a bunch! -Kurt -----Original Message----- From: Tim Hunter [mailto:cyclists@nc.rr.com] Sent: Wednesday, December 18, 2002 4:13 PM To: ruby-talk@ruby-lang.org Subject: Re: How to specify a record delimiter in a source text file? Set $/ to the separator you desire. Set it to nil and gets will read the entire file as one big record. On Thu, 19 Dec 2002 08:36:26 +0900, Kurt Euler wrote: > All- > > Please advise as to how I can deliniate end-of-records by something > other than the default hard-return. >