in reply to Re^4: How to import "global" variables into sub-scripts from main script?
in thread How to import "global" variables into sub-scripts from main script?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: How to import "global" variables into sub-scripts from main script?
by LanX (Saint) on Mar 22, 2021 at 16:57 UTC |