From: Bulat Ziganshin Date: 2003-02-21T15:00:16+09:00 Subject: Re: optimization question Hello Travis, Thursday, February 20, 2003, 7:18:49 PM, you wrote: TW> I omitted an important detail in my original post. The hash needs to retain TW> state for every line of the file, i.e., TW> hash = Hash.new(0) TW> fh.each do |data| TW> data.scan(iptok).each do |tok| TW> hash[tok] = hash[tok].succ TW> end TW> end TW> return hash this changes all :( can you read entire file into memory? -- Best regards, Bulat mailto:bulatz@integ.ru