in reply to printing hash values, (don't need the keys)
injunjoel's The Uniqueness of hashes. has numerous examples answering just such questions.
HTH,