"be consistent" | |
PerlMonks |
Re^6: Randomly choosing from a set of alternatives with varying popularityby LanX (Saint) |
on Mar 28, 2022 at 16:11 UTC ( [id://11142465]=note: print w/replies, xml ) | Need Help?? |
> I'm curious why the order in which the hash is traversed would matter at all. It doesn't for this special algorithm, like already explained here But if you want the inverse - however "inversion" is defined - you need to build a new hash with accordingly "inverted" weights, like demonstrated here.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|