in reply to get variable from file to exist within perl code
Hello mcaongusa, and welcome to the Monastery!
I can't figure out what I am doing wrong.
If a my declaration occurs in an eval, its scope extends only to the end of that eval. From the documentation for my:
A my declares the listed variables to be local (lexically) to the enclosing block, file, or eval.
But anyway, as 1nickt and hippo have said, what you’re trying to do is a bad idea, and there are better approaches.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|