http://www.perlmonks.org?node_id=1096330


in reply to Re: weighted biased dice roll (bugs)
in thread weighted biased dice roll

Each call of the function iterates over a new hash, so the iterator doesn't need resetting.