It doesn't work if there was an undef explicitly assigned to the value before. A lot of people get tripped up by this because they just assign undef to something they don't use anymore instead of deleting the key.
My criteria for good software:
Does it work?
Can someone else come in, make a change, and be reasonably certain no bugs were introduced?