That looks like one of the closure bugs that Dave Mitchell fixed for Perl 5.9.x. In short, sometimes Perl doesn't see all references to lexical variables. Doubly-nested subs (an anonymous sub declared within a named sub) were one offender. Your string-eval construct looks like it could be another.
The solution for Perl 5.8.x and earlier is to refer to the lexical variable in the intervening scope so that Perl can close over it appropriately.
In reply to Re: quantum behavior in perl?
by chromatic
in thread quantum behavior in perl?
by b4swine
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |