http://www.perlmonks.org?node_id=970560
mrc has asked for the wisdom of the Perl Monks concerning the following question:

I have this HoH
my %HoH = ( SUB1 => { Test1 => { value1 => "2300", value2 => "0.01", }, Test2 => { value1 => "5000", value2 => "0.34", }, Test3 => { value1 => "3000", value2 => "0.10", }, Test4 => { value1 => "7000", value2 => "0.33", }, }, SUB2 => { Test1 => { value1 => "2800", value2 => "0.05", }, Test2 => { value1 => "5500", value2 => "0.34", }, }, SUB3 => { Test1 => { value1 => "2700", value2 => "0.25", }, Test2 => { value1 => "5800", value2 => "0.45", }, }, );
Using "Test1" I want to sort it by "value1" and display something like:
for "Test1" SUB2 has value1=2800 SUB1 has value1=2300 OTHERSUB value1=2000 etc.
I don't know how to sort so deep in a hash of hashes or even deeper. Can someone please advice?