![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Tracking down the source of a new 5.10 warningby ikegami (Patriarch) |
on Sep 16, 2009 at 00:15 UTC ( [id://795493]=note: print w/replies, xml ) | Need Help?? |
Subs only capture the vars they think they need. They get it wrong in the case sub { eval '$x' }. In older versions of Perl, the error was silent.
In newer versions of Perl, the error still exists, but a warning issued.
The solution is to add a reference to the variable that needs to be captured inside of the anon sub.
In Section
Seekers of Perl Wisdom
|
|