Perl Monk, Perl Meditation | |
PerlMonks |
Re: Sorting a hash in a predetermined orderby ctilmes (Vicar) |
on Nov 18, 2015 at 01:48 UTC ( [id://1147966]=note: print w/replies, xml ) | Need Help?? |
I agree with others, hard code the list. This is going to eventually be used as a nagios check and it would be great if the output could be in a consistent order. BTW -- if all you want is a consistent order, that will be true. As long as you have the same set of hash keys, they will output in the same consistent order. (at least for the same version of perl..) If you want them in a specific order, that's when you need one of the other solutions.
In Section
Seekers of Perl Wisdom
|
|