Thanks for those wise words, Corion! I am getting my head around it now.
and that is indeed the problem - when there is only one element the output is a hash table within a hash table, instead of an array of hash tables within a hash table.
to make an array of hash tables within a hash table without using the name of the element?
Up until now this module has allowed the use of arbitrarily named elements and I would like to keep it this way.