This is a case where recursion may be helpful. However, based on your other posting, I think you may be trying to solve the wrong problem. If you're trying to combine project.opp.Index.title=Opportunities project.opp.Index.link=Report into a single nested hash, then you don't need to build separate nested hashes and then combine them. I think it would be easier to build the final hash up-front, as you read in each new line. Of course, doing a deep-merge of a nested hash structure is an interesting exercise, or homework problem :-) -- Posted via http://www.ruby-forum.com/.