in reply to Re^3: Use of freed value in iteration
in thread Use of freed value in iteration
"but if you change the loop to iterate over @values or the keys of $hr3 then the issue disappears"
Yeah, iterating over @values would be really bad if you wanted to ensure you are only dealing with things defined in $hr3. Iterating over the keys of %$hr3 is definitely the safer way to go. That way when $hr3->{$key} is accessed you'll get a warning if it doesn't exist.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Use of freed value in iteration
by swl (Prior) on Feb 12, 2024 at 23:30 UTC | |
by choroba (Cardinal) on Feb 13, 2024 at 12:46 UTC | |
by Danny (Chaplain) on Feb 13, 2024 at 16:35 UTC | |
by hv (Prior) on Feb 13, 2024 at 17:21 UTC | |
by syphilis (Archbishop) on Feb 14, 2024 at 00:11 UTC | |
by Danny (Chaplain) on Feb 24, 2024 at 21:48 UTC | |
|