The docs on `each` were revisited during the hash overhaul in 5.17. The assertion is that you can delete the most recently retrieved key safely, but deleting any other key may change the iteration order. I believe this was also asserted on the list. The docs for FieldHash say: > If anything you do inside the loop could cause an object to go out of scope, > a random key may be deleted from the hash you are looping over. This matches the assertion in the `each` docs. Unless perlfunc's entry for each is wrong, there is no contradiction. I believe Yves said that he did work to keep deleting the current key safe. MJD's mistake, if any, would be to say that you could delete *any* key you'd already visited, rather than the *one* key you *just* got. I think the docs are correct. Perhaps someone -- Yves? -- could confirm. -- rjbsThread Previous | Thread Next