in reply to Re^2: Error with User defined data
in thread Error with User defined data

The problem is that you're redefining $key and $value inside your loop. The result is that the conditional in the while statement is using the values you entered the first time. Just remove the 'my' from the $key and $value inside your loop, and you should be fine. (That's assuming your chomp statements aren't commented out. Since your code isn't formatted properly, I can only guess.

...roboticus

When your only tool is a hammer, all problems look like your thumb.