in reply to companring arrays and hashes

hotshot,

Take a look at thread Need a test for deep equality. Although most of the routines did not meet my exact requirements, many of the routines here will do what you are asking.