From: Ron Jeffries Date: 2002-03-26T05:39:35+09:00 Subject: Re: ruby -n -e doesn't find things ... On Mon, 25 Mar 2002 19:38:13 GMT, matz@ruby-lang.org (Yukihiro Matsumoto) wrote: >Hi, > >In message "Re: ruby -n -e doesn't find things ..." > on 02/03/26, Ron Jeffries writes: > >|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? > >How about the following? > > ruby -ne 'BEGIN{ARGF.binmode}; ....} Cool, I'll make a note of that. Do you agree that the eof? method should be doing the same thing in binmode and in text mode? If not ... what am I missing? 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.