From: Corey Konrad <0011@...> Date: 2007-03-16T07:32:13+09:00 Subject: Re: chomp Robert Klemme wrote: > On 15.03.2007 22:26, Corey Konrad wrote: >>> "chomp" can be used on *any* string. >> variable the way i did i would have to do it like this >> >> print "Please enter the temperature: " >> temp = gets >> $_ = temp >> chomp >> temp = $_ >> puts "The temperature is #{temp}." >> >> i just dont understand why the author would make things so convoluted >> like that. > > I don't either. Sounds strange. Btw, you can even do > > print "Please enter the temperature: " > puts "The temperature is #{gets.chomp}." > > Kind regards > > robert yeah i know i just wanted to make sure i wasnt missing a point the author was making. thanks -- Posted via http://www.ruby-forum.com/.