On Tue, 28 Mar 2006, Ernest Obusek wrote: > I'm new to Ruby so perhaps this is obvious to you but not to me. Can anyone > tell me what is wrong with my simple script below: > > $ cat t.rb > > #!/usr/bin/ruby > > puts "Timer set to #{ARGV[0]} seconds. Press <ENTER> to start the > countdown." > gets > > > $ ./t.rb 60 > Timer set to 60 seconds. Press <ENTER> to start the countdown. > ./t.rb:4:in `gets': No such file or directory - 60 (Errno::ENOENT) > from ./t.rb:4 > > It seems to think the argument of 60 should be a file or directory... ???? > > Thanks, > > Ernest you have not given a receiver to gets and the default one is ARGF (see pickaxe for desc). try STDIN.gets hth. -a -- share your knowledge. it's a way to achieve immortality. - h.h. the 14th dali lama