You can do what you want ("without eval") by using require.
That's not strictly "without eval". All of eval STRING, do FILENAME, require FILENAME, require MODULE, use FILENAME, use MODULE, and evalbytes STRING (since v5.16) finally evaluate a string or file contents as perl code and execute it. See Re^4: Storing state of execution.
Alexander
In reply to Re^2: Accessing variables in an external hash without eval
by afoken
in thread Accessing variables in an external hash without eval
by victorz22
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |