<snip> >> is there away to void having to write something like: >> >> if dict.key?(line.length) >> dict[line.length] << line >> else >> dict[line.length] = line >> end > > dict = Hash.new{Array.new} should work. Sorry, I meant Hash.new{|hash,key| hash[key] = []} -- Roger Braun rbraun.net | humoralpathologie.de