Robert Klemme wrote: > You on the other hand want the block form because that can do arbitrary > things when a key is not found: > >>> h=Hash.new() {|ha,key| puts "missing #{key}"; ha[key] = []} Thanks a lot :-). I had actually already tried the block form, but in a way similar to what Mike Fletcher posted. I now see that simply returning something from the block does not modify the hash.. you have to explicitly modify the hash within the block. Thanks to both of you for responding. Michael. -- Posted via http://www.ruby-forum.com/.