From: Simon Harrison Date: 2011-04-02T05:55:43+09:00 Subject: Re: Searching a CSV file - beginner seeking help Sorry, don't know your name. You're just appearing as 'guest'. Are you sure it's a good idea to have globals in block variables? I've been continuing to play and the following seems to be what I'm after. Sadly nothing prints out and the program exits. def search_for_film print "Enter name of film to search for: " film = gets.chomp.downcase results = @films.grep(/film/) if results print results elsif results.empty? puts "Nothing found." else menu end end Here is irb demonstrating that it *should* work! irb(main):009:0> films = ['the mummy', 'the mummy returns', 'the mummy 7', 'the daddy'] => ["the mummy", "the mummy returns", "the mummy 7", "the daddy"] irb(main):010:0> films.grep(/mummy/) => ["the mummy", "the mummy returns", "the mummy 7"] irb(main):011:0> -- Posted via http://www.ruby-forum.com/.