in reply to Re^2: hash of hashes sort second level keys
in thread hash of hashes sort second level keys

It's not totally clear for me what does it mean "trying to sort the entire hr on the keys of layer 4 first and layer 3 second", but if it means to sort by the 4th column as the key and 3rd column as a subkey, then probably you wanted to write this to sort the flattened array:
sort { $a->[3] <=> $b->[3] or $a->[2] <=> $b->[2] } @flat_array

Replies are listed 'Best First'.
Re^4: hash of hashes sort second level keys
by aeaton1843 (Acolyte) on Feb 19, 2010 at 23:40 UTC

    "if it means to sort by the 4th column as the key and 3rd column as a subkey" is exactly what I was doing. That is very nice! This is exactly what I was looking for, great answer. I will rewrite some code and see how it goes. Thanks again for the replies!