From: James Edward Gray II Date: 2006-03-12T00:37:11+09:00 Subject: Re: Help me understand why the Ruby block is slower than without On Mar 10, 2006, at 5:28 PM, William James wrote: > File.open("wordlist") { |f| > while w = f.gets > puts w if w.size==11 && w.split(//).uniq.size == 11 > end > } That's what the foreach() iterator is for: File.foreach("wordlist") do |word| puts word if word.chomp.split("").uniq.size == 10 end James Edward Gray II