From: Ron Jeffries Date: 2002-03-26T01:59:13+09:00 Subject: Re: ruby -n -e doesn't find things ... I believe the problem is that the file contains binary characters. When I write the loop in a little Ruby program it fails the same way when I open the file "r" and works if I open it "rb". It seems to me that looking for the EOF character was deprecated in Windows sometime around 1913. You're supposed to use the file size, which I would guess is what's happening in the "rb" mode. Should I be reporting this as a bug? B, is there a way to tell Ruby to open the files in binary mode when doing a one liner from the command line, i.e. with -n or -p? Thanks! Ronald E Jeffries http://www.XProgramming.com http://www.objectmentor.com I'm giving the best advice I have. You get to decide whether it's true for you.