http://www.perlmonks.org?node_id=1190444


in reply to Re: Accessing variables in an external hash without eval
in thread Accessing variables in an external hash without eval

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

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)