in reply to Iterating over an hash while removing keys
- scalar(keys %$hash); # Force reset + keys %$hash; # Force reset
Update: Documented in keys:
> In particular, calling "keys" in void context resets the iterator with no other overhead.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Iterating over an hash while removing keys
by Eily (Monsignor) on Feb 06, 2020 at 16:57 UTC |