Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
A very good point! Note also that in deeply nested hashes, exists will autovivify intermediate levels of the hash in the process of testing the existence of a low level element. To be nitpicky, it's not exists, but the hash accesses preceding the exists call. Anyway, I just wanted to point out that the ugly-but-entirely-core way to avoid the autovivification in this example is:
Although as I described in a recent thread, I try to keep my hash accesses fairly simple. In reply to Re^2: "print" of nonexistent element is actually altering a hash
by haukex
|
|