[Q&A Editor- Changed '(split "/",scalar %h)[0]' to "scalar keys %h" as noted by chipmunk.]$lh=scalar keys %h; print ((keys %h)[int rand($lh)]);
In reply to Re: How do I select a random key from a hash?
by arhuman
in thread How do I select a random key from a hash?
by tadman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |