in reply to Confused: Hashrefs in TieRegistry
And the "usual" way to use each is:
The way you are using each, you will always hit the die when you run out of keys and values. If you want to make sure you have some keys and values, put a counter in the loop, and check the count after the loop.while (my ($key, $value) = each %hash) { #...process $key, $value... }
|
|---|