Home: Perl Programming Help: Frequently Asked Questions:
Why don't my tied hashes make the defined/exists d



Jasmine
Administrator

Jan 19, 2001, 3:29 PM


Views: 3204
Why don't my tied hashes make the defined/exists d

(From the Perl FAQ)

Why don't my tied hashes make the defined/exists distinction?

They may or may not implement the EXISTS() and DEFINED() methods differently. For example, there isn't the concept of undef with hashes that are tied to DBM* files. This means the true/false tables above will give different results when used on such a hash. It also means that exists and defined do the same thing with a DBM* file, and what they end up doing is not what they do with ordinary hashes.