Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I want to randomly select a key from %hash_keys such that its value is between 02 and 05, for instance. That is, I want to randomly between keys c, d, e, and f. What would be the easist way of doing this?my %hash_keys = ( a => 00, b => 01, c => 02, d => 03, e => 04, f => 05, g => 06 );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to randomly select a key whose value is between a range?
by golux (Chaplain) on Sep 04, 2015 at 22:49 UTC | |
|
Re: How to randomly select a key whose value is between a range?
by davido (Cardinal) on Sep 05, 2015 at 05:18 UTC | |
|
Re: How to randomly select a key whose value is between a range?
by stevieb (Canon) on Sep 05, 2015 at 00:59 UTC | |
by locked_user sundialsvc4 (Abbot) on Sep 05, 2015 at 13:58 UTC |