Do you know where your variables are? | |
PerlMonks |
Re^5: How to import "global" variables into sub-scripts from main script?by haukex (Archbishop) |
on Mar 22, 2021 at 16:29 UTC ( [id://11130141]=note: print w/replies, xml ) | Need Help?? |
the global variables are all correctly shared among the files--so why wouldn't strict be shared, too? Because strict, warnings, and many other pragmas have a lexical scope. If used at the very top of the file, their scope is limited to that file. do, require, and use create a new lexical scope for the files they execute. Only evaled code inherits the strict and other pragmas from the surrounding lexical scope.
In Section
Seekers of Perl Wisdom
|
|