#!/usr/local/bin/ruby # -*- mode: ruby -*- # $Id: spellcheck.ruby,v 1.6 2001/01/23 01:30:42 doug Exp $ # http://www.bagley.org/~doug/shootout/ dict = Hash.new file = open("Usr.Dict.Words") while file.gets() dict[$_.chomp!] = 1 end file.close() count = word = 0 while STDIN.gets() unless dict.has_key? $_.chomp! puts $_ end end