foreach (@list_of_random_hash_keys) { # do something interesting with $_ which will # contain a random hash key }