in reply to Hash quesiton

I think we need to see more, there are some ambiguous things there. for each is wrong one way or another, but I can't tell which. It might be meant as foreach, or it might lack parens, intending the less likely for (each  . . .). Or do you mean for our $element ($List{.....}) ?

What is $element? As written, it makes a syntax error with the parens. If it's a code reference, you need to deref with -> before the parens. That would give trouble with each, since it expects a hash and the closest things a sub can return is a list of key/value pairs or a hash reference.

Your hash structure itself is just a HoHoHo...H which has some kind of scalar data five levels down.

All told, there are too many errors there to tell what's intended.

After Compline,
Zaxo