in reply to Re: Doubt in Eval
in thread Doubt in Eval
I'll demonstrate that the eval statement is a red herring....
It's not a red herring: you changed the order of the code and thus its behavior. When the parser encounters $aa in your example, it hasn't seen the declaration three lines later.
If you had merely removed the eval block, the result would run just fine without the variable declaration error.
Improve your skills with Modern Perl: the free book.
|
|---|