From: Robert Klemme Date: 2006-08-16T18:05:09+09:00 Subject: Re: goto function? On 15.08.2006 23:00, fabsy wrote: > >> begin >> ... >> end while your_condition_here >> >> begin >> ... >> end until your_condition_here >> >> If you need an endless loop >> >> loop do >> ... >> end >> >> See also >> http://ruby-doc.org/docs/ProgrammingRuby/html/tut_expressions.html#S6 >> >> Note that your script opens the file over and over again and never >> closes it. This can cause problems - especially since you do it with >> different modes. > I don't really understand.. You call File.open() but you do not call #close(). Note that there are other means to read from a file, e.g you can do File.readlines or File.read. See RDOC here http://www.ruby-doc.org/core/ > I want the script to start over again.. for example.. > When the user made an input and pressed return I want the script to > "restart" or jump to the beginning.. That's why I gave you the looping constructs. robert