nagalenoj has asked for the wisdom of the Perl Monks concerning the following question:
I've a hash of hash like,
I've tried to get this in different ways. But, the code is larger like writing in conventional languages. Someone help me write this smarter.
where I want to get the maximum and minimum of all years. So, result will be 02 in 2008 is maximum and 01 in 2007 is the minimum.Year = { 2007 = { 01 => 07, 02 => 34, 10 => 24, 09 => 14, } 2008 = { 01 => 11, 02 => 64, 03 => 20, 09 => 13, } }
I've tried to get this in different ways. But, the code is larger like writing in conventional languages. Someone help me write this smarter.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: min and max in a hash of hash
by ikegami (Patriarch) on Jul 12, 2010 at 06:12 UTC | |
Re: min and max in a hash of hash
by Marshall (Canon) on Jul 12, 2010 at 09:32 UTC | |
Re: min and max in a hash of hash
by AnomalousMonk (Archbishop) on Jul 12, 2010 at 20:16 UTC | |
Re: min and max in a hash of hash
by ikegami (Patriarch) on Jul 12, 2010 at 06:04 UTC | |
by wwe (Friar) on Jul 12, 2010 at 16:30 UTC | |
by ikegami (Patriarch) on Jul 12, 2010 at 22:28 UTC | |
by pRaNaV (Novice) on Jan 22, 2012 at 12:02 UTC | |
by Anonymous Monk on Jul 17, 2014 at 19:52 UTC | |
by AppleFritter (Vicar) on Jul 17, 2014 at 20:47 UTC |
Back to
Seekers of Perl Wisdom