good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^2: Missing error under strict (Perlbug: postfix 'until' has inconsistent scope)by Pascal666 (Scribe) |
on Jul 24, 2019 at 01:31 UTC ( [id://11103266]=note: print w/replies, xml ) | Need Help?? |
> I boiled the problem down to this code Here you are initializing a seperate variable before the until, which is getting reset by the my inside the until. In my code I was initializing the variable inside the until, and then attempting to use it after. Seems like two different (but related) bugs to me. > PS: I have problem to imagine practical code, where this bug is posing a problem. My original code: I wasn't sure about the scope when I wrote that line, but figured worst case I would get a compile error and move the my to the line above. Had a hell of a time figuring out why %boxes was always null when I tried to access it later (it should loop until %boxes is not null).
In Section
Seekers of Perl Wisdom
|
|