in reply to Does redo create a new dynamic scope?
Sorry for the very short note (I'll try to expand on this when I have more time).
I suspect that the new scope is required for the sake of any lexical variables in the block (and because re-initialization of lexicals happens at the end of the block).
I'm interested in why the match variables are not inherited in this new scope since the match operation was performed from outside of the curly braces. It is my understanding that some control structures in Perl introduce an implicit scope beyond the one(s) designated by the braces, but I didn't think any of them altered the brace-designated lexical scope. And match variables should survive into nested scopes.
- tye
|
|---|