|Perl Monk, Perl Meditation|
Perl - Sort a multi dimensional hashby krishnashah (Initiate)
|on Jan 16, 2013 at 23:16 UTC||Need Help??|
krishnashah has asked for the
wisdom of the Perl Monks concerning the following question:
Hash looks like this:
Question: I want to sort this hash on the basis of 'keyc' whose value is varied. So, I want to sort on the basis like below: Key1:Key1_si->KeyB->Keyc Key1:Key1_si->KeyA->keyc Also, I want to have the output with the sorted values along with the rest of attributes like : Print: Key1:Key1_si KeyB Keya keyd Keyc keyf Key1:Key1_si KeyA keya keyd Keyc keyf Can somebody please help me with the code in perl to perform sort as mentioned above. I will really appreciate your time and efforts.