Perhaps not the most elegant of ways to handle this (I suspect it can be done better), and may go a little further than you intended (I am not sure this way would necessarily be recommendable), but perhaps it may prove useful. The code can handle a (multilevel structure that consists only of scalars, arrays, and hashes, which it sends to a function for processing (which, in this case, is only display). Hope it helps.