From: nobu.nokada@... Date: 2002-03-09T04:27:07+09:00 Subject: Re: How To: Read a paragraph at a time Hi, At Sat, 9 Mar 2002 04:12:47 +0900, James Davis wrote: > I tried this: > pCnt = 0 > fn = 'c:\temp\work.txt' > f = File.new(fn, "r") > f.gets("") {|p| > pCnt += 1 > puts p > } > print('Paragraph count = ', pCnt,"\n") IO#gets doesn't yield the block, use `each' instead. -- Nobu Nakada