That ouput you gave us is enlightening. It suggests that when you are putting the %hash hash together, you are inserting array references instead of the values you are expecting. I suspect that in the code that is inserting the key/value pairs into %hash, you need to dereference the value. If you can't find the error, post the portion of your code that assigns the key/value pairs to %hash and we can help you.