in reply to Iterating over hash while deleting elements
in thread Iterating over an hash while removing keys
each has no problem if you delete the current elementNice to know but I wouldn't rely on it. I think "don't use each if the hash changes" is an easier rule to follow/understand. And it's safer against possible future changes as well (you might start by only deleting the current key, and then find out you can delete a few more at the same time).
Question to follow ;-PSpooky...
In Section
Seekers of Perl Wisdom