Thanks that really shortens up my code and works but i have a couple questions a, n = nil puts "Please enter 5 words" until (a = (gets.scan /[\w'-]*/) - [""]).length == 5 puts "Please type in exactly FIVE words, thanks." end puts "You would like to print out which word number? (1-5)" until (1..5).include? (n = gets.chomp.to_i) puts "Please pick a number 1 through 5" end puts a[n - 1] i under stand almost all of it (i just dont get what the - [""] does and i think that means that it puts it into an array but the main questions i have are why did you type a, n = nil that isnt needed and also why did you type /[\w'-]*/) when /\w+/ works the same ... i think -- Posted via http://www.ruby-forum.com/.