in reply to hash assignment wierdness
Digging into hash_file.c would most likely reveal that the hash operators make no special case for undef, and treats it as it would any other scalar value in assignmets. So as far as perl is concerned, when you assign undef to a hash, you're asking it for a hash containing the undef value.
As far as I am aware, the only way to null out a hash is to use it as an argument to undef, as in your example code.
Obidan :wq
|
---|