From: Philipp Taprogge Date: 2007-04-22T23:25:05+09:00 Subject: Re: Reading empty File Hi! Thus spake Bino Oetomo on 04/21/2007 07:14 AM: > Question : How to tell ruby to go to next command if only the file is > not empty. You have two options: either you rescue the EOFError and deal with it programmatically, or you just use IO.gets instead of IO.readline, which will not raise an error but return 'nil' if the EOF is reached. HTH, Phil