in reply to Re: my Scope Pop Quiz
in thread my Scope Pop Quiz

Or must we simply accept that undefined behavior cannot ever be predicted
That's the whole point of undefined behaviour :-)

As it happens there's a difference between the compile-time and run-time scope of $rv; at compile time its scoped to EOF so the print sees the same lexical; at run-time its scoped to the loop, so gets set to undef at the end of the loop. But that might change.

Stuff where the loop may not get executed, such as my $rv if $false gets more complicated.

Dave.