Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have a whole bunch of environments env1, env2, etc each with a corresponding date. I want to simply loop through the key value pairs in order of descending date (i.e larger dates first). If the environments have the same date, order does not matter. Basically, I want to do a reverse sort by value (not key) of the pairs that come out of perl each... but how??? I've also seen on the Internet that "each" should be avoided... So i want to end up with the following output:my $hash = { env4 => 20140830 env1 => 20140829 env2 => 20140828 env3 => 20140828 };
thanks! Michaelenv4, 20140830 env1, 20140829 env2, 20140828 env3, 20140828
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: struggling with what should be a very simple perl task
by davido (Cardinal) on Aug 22, 2014 at 16:44 UTC | |
by Anonymous Monk on Aug 22, 2014 at 16:48 UTC | |
|
Re: struggling with what should be a very simple perl task
by AnomalousMonk (Archbishop) on Aug 22, 2014 at 16:55 UTC |