Yes, that is correct behavior, try using defined and/or length instead. (see update instead)
UPDATE: actually ... those will not work the way you think they will either. Usually one only needs to test for the value of a key, not the key itself. Try greping the keys from the hash, or use a foreach on the keys to see if the key in question is there or not.
Furthermore, try checking only if (exists($List{c}) ) ... exists is not autovivifying the key "c" ... checking $List{c}->{1} is what is causing the key "c" to be created.
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to Re: Unexpected exists() behavior
by jeffa
in thread Unexpected exists() behavior
by tsmoyers
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |