in reply to eval do {} -- magical variable assignment?
I'm not so surprised by that result. The eval documentation states:
The value of the expression (which is itself determined within scalar context) is first parsed, and if there weren't any errors, executed in the lexical context of the current Perl program, so that any variable settings or subroutine and format definitions remain afterwards.
where the operative words are "executed in the lexical context of the current Perl program".
So there's nothing particularly magic there; it's just the behavior of good ol' eval.
|
|---|