in reply to Random Hash Key according to key frequency

While it takes parameters in a different form, I think you can use Randomize. If you check the module docs, it seems to do exactly what you want.

HTH, --traveler