![]() |
|
go ahead... be a heretic | |
PerlMonks |
Re^3: scope and declaration in local packagesby ikegami (Patriarch) |
on Jan 31, 2011 at 15:50 UTC ( #885299=note: print w/replies, xml ) | Need Help?? |
Function and variable declarations both happen at compile time. You wouldn't have been able to compile the function if that wasn't the case. How can it use a variable that doesn't exist? Assignments, on the other hand, happen at run-time. That's why the following code works:
In Section
Seekers of Perl Wisdom
|
|