in reply to Iterating over hash contents?

Does anyone know how I can check a DBM for matches to two variables? I'm connecting to it with a hash, using this:
dbmopen(%HASH,dbm_db,0644);
I want to check to see if $var1 equals the key, and then if $var2 equals the value. Does anyone know of a good way to do this?

Thanks,
Spidy