From: Sebastian Hungerecker Date: 2007-03-31T04:57:23+09:00 Subject: Re: Newbie needs a pointer dwyer@o2.ie wrote: > #a continous loop until 'q' is press > puts "Please enter your name?" > name=gets > while (name!='q') > puts "welcome, #{name}Enter your name again:" > name=gets > > end After name=gets name contains the string that the user typed including the enter. So if the user enters 'q', the value of name is "q\n". You can remove the \n with the chomp method (i.e. use name=gets.chomp instead of name=gets). HTH, Sebastian -- Ist so, weil ist so Bleibt so, weil war so