in reply to Re^3: Iterating over hash while deleting elements
in thread Iterating over an hash while removing keys
point is you must delete the current key to avoid an endless loop.
not sure how an idiot proof algo would look like.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
In Section
Seekers of Perl Wisdom