in reply to "A meditation on Hashes", or "Why i need more aspirin"
Maybe including the program output would be helpful, then point out which results you find surprising.
The results of defined() on "" or undef apply to any perl variable, not just hashes, and a hash key existing after being assigned "" or undef shouldn't really be that surprising.
After running this myself, the only outcome that I didn't expect, was that exists $hash{d} returns false after print $hash{d}. I had expected the print to autovivify the d key to contain undef.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: "A meditation on Hashes", or "Why i need more aspirin"
by xdg (Monsignor) on Jun 16, 2006 at 13:20 UTC |