in reply to Stuck with Creating Multi-Level hash
You may find the thread unknown number of dimensions of a multidimensional hash and my reply in it helpful.