>>778
keys,valuesをvoidコンテキストで呼べばeachのリセットだけ
やってくれるのでオススメ。perlfunc(1)のkeysのとこにも
明記されている。

As a side effect, calling keys() resets the HASH's internal
iterator, see "each". (In particular, calling keys() in void
context resets the iterator with no other overhead.)