On 5/24/05, Ing. Branislav Gerzo wrote:
> 
> it was easy mistake, everything we should know about this is avoid
> using keys() on %$hr in while loop, because it resets iterator. That's
> all. 

Well, that, and don't change the hash inside the while loop. In your
original email you wrote:
"and get_something() change the hash"
That's a no-no according to "perldoc -f each": "If you add or delete
elements of a hash while you're iterating over it, you may get entries
skipped or duplicated, so don't."

Cheers,
-- 
Offer Kaye

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to