On Thu, Jan 12, 2012 at 9:08 PM, Father Chrysostomos via RT <perlbug-followup@perl.org> wrote: > My question is: Why is it unsafe at all to create or delete things from > a hash that is being iterated? Here is the relevant MJD post, I think: http://blog.plover.com/prog/perl/undefined.html#3 > There have been at least three fixes to the deletion code since 5.14. > Could it have anything to do with those? MJD looks like it was legacy Larry code that had the problem. I think it's all to avoid requiring two passes. Should it be (now or in the future) safe to delete arbitrary keys during iteration, then the same would apply to inside-out object destruction. -- DavidThread Previous | Thread Next