Task: Safe Perl Hash Iteration
Task: Safe Perl Hash Iteration: a task in Terminal-Lego-15k (Harbor dataset). The each() function maintains an internal iterator state on the hash, which can lead to subtle and dangerous bugs — particularly when iteration is interrupted early (e.g., via last or return ), or when each is called on…
The task
The `each()` function maintains an internal iterator state on the hash, which can lead to subtle and dangerous bugs — particularly when iteration is interrupted early (e.g., via `last` or `return`), or when `each` is called on the same hash in nested contexts. The `keys()` function, on the other hand, returns a full…
Part of PrimeIntellect/Terminal-Lego-15k.