From: Harry Date: 2007-02-03T05:37:46+09:00 Subject: Re: Reading several data entries per line from screen On 2/3/07, Alex DeCaria wrote: > Is there a single, easy method in Ruby that will let me read multiple > numbers from the screen directly into multiple variables? > > For instance, say I have two variable called "age" and "weight", and > query the user to enter them on the same line. In FORTRAN I'd just say > > READ(*,*) age, weight > > > Is this what you are looking for? name, age, weight = gets.split(/,/) puts name puts age puts weight Harry -- http://www.kakueki.com/ruby/list.html