in reply to How do I select a random key from a hash?

$lh=(split "/",scalar keys %h)[0]; print ((keys %h)[int rand($lh)]);
[Q&A Editor- Changed "scalar %h" to "scalar keys %h" as noted by chipmunk.]

Originally posted as a Categorized Answer.