Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^6: How to import "global" variables into sub-scripts from main script?

by LanX (Saint)
on Mar 22, 2021 at 16:57 UTC ( [id://11130145]=note: print w/replies, xml ) Need Help??


in reply to Re^5: How to import "global" variables into sub-scripts from main script?
in thread How to import "global" variables into sub-scripts from main script?

> Only evaled code inherits the strict and other pragmas from the surrounding lexical scope.

and because of the lexical scoping he can also deactivate most pragmas like strict before eval to avoid that problem

{ no strict; eval $CODE; }

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

  • Comment on Re^6: How to import "global" variables into sub-scripts from main script?
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11130145]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-25 19:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found