From: Morton Goldberg Date: 2007-11-24T06:36:17+09:00 Subject: Re: Problem getting user input On Nov 23, 2007, at 1:44 PM, Peter Vanderhaden wrote: > Sebastian, > THANK YOU, THANK YOU, THANK YOU! > The $stdin.gets works perfectly! I really appreciate all you > experienced folks helping out this newbie! I'm going to hilight this > stuff in PickAxe when I get done. > PV > > Sebastian Hungerecker wrote: >> Peter Vanderhaden wrote: >>> If I use gets, the script just prints the prompt and seems to end. >> >> I see in your script that ARGV is not empty. That means >> Kernel#gets is >> gonna read from the files in ARGV and not from stdin. To rectify that >> use $stdin.gets instead. Or empty ARGV before you call gets. Speaking of ARGV, you don't need this line in your code: 45 @ARGV = $* # list of arguments passed to the script Just use the pre-defined ARGV instead of @ARGV Regards, Morton