I was wondering if deleting keys while iterating over a hash was reallocating the buckets and perhaps Perl was then trying to access memory that's not there. According to Adding or removing keys while iterating over a hash, this is not the case. I can't add, but I should have no problem deleting. Both merlyn and Dominus state that. However, what's vexing about this is that it appears similar to a Perl4 issue where deleting from a hash while iterating over it was verboten. This was fixed in Perl5.
Forgetting the keys should certainly cause the code to fail, but generating a core dump? That's certainly going to cause some people to panic :)
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
In reply to (Ovid) Re: Why does this dump core?
by Ovid
in thread Why does this dump core?
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |