From: Aldric Giacomoni Date: 2010-01-13T05:51:39+09:00 Subject: Re: SPOJ ? Test for end of file input Brian Candler wrote: > > gets will return nil on end of file. > > while line = $stdin.gets > line.chomp! > puts "I got #{line} !!" > end > Ah! And the light comes on and blinds me. Thank you! -- Posted via http://www.ruby-forum.com/.