Robert K. wrote in post #995478:
> On Wed, Apr 27, 2011 at 10:02 PM, Cee Joe <cyril_jose / ymail.com> wrote:
>> Would I use a do iterator or use a while loop with a gets method? Or
>> access again.
>> helpful. Thanks!
> One of the simplest approaches is to use Ruby's ability to use
> arbitrary record delimiters:
>
> File.foreach file_name, ">" do |chunk|
>   chunk.chomp! ">"
>   chunk.gsub! /\r\n?|\n/, '' # remove line terminators
>

Cee Joe, are you reading the file in binary mode or text mode?

-- 
Posted via http://www.ruby-forum.com/.