in reply to Confused: Hashrefs in TieRegistry

What are you expecting "Dumper %RegHash = $error;" to do? You seem to be overwriting %RegHash that was assigned to earlier.

And the "usual" way to use each is:

while (my ($key, $value) = each %hash) { #...process $key, $value... }
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.