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