Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Accessing variables in an external hash without eval

by afoken (Abbot)
on May 17, 2017 at 07:36 UTC ( #1190444=note: print w/replies, xml ) Need Help??


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". ;-)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1190444]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2018-07-18 14:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (393 votes). Check out past polls.

    Notices?