It is not very difficult if you enable warnings; it says "Use of freed value in iteration". Note that $a{b} is deleted in both iterations, yet on on of the iterations it tries to derefence its value of the key (the value is already freed, along with the key.) The program decides to exit with die() and does not crash.
In reply to Re: delete hash element while traversing via values coredumped
by ioannis
in thread delete hash element while traversing via values coredumped
by jesuashok
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |