From: Jim Freeze Date: 2006-06-12T03:44:53+09:00 Subject: Re: gets problem - strange On Jun 11, 2006, at 1:36 PM, Marcel Molina Jr. wrote: > It works like perl in this regard, expecting the arguments on the > command > line to be files the lines of which you want read. > > % echo -e "foo\nbar" > some_file > % echo "while l = gets; p l end" > gets.rb > % ruby gets.rb some_file > "foo\n" > "bar\n" So, I suppose that one needs to empty out ARGV before using gets? Wow. Really?! Jim Freeze