Mar 3, 2018, 8:29 AM
Re: [alex5161] In a perl-script trying to execute another perl-script that SETS SOME VARIABLES for caller script
To leave (as it is stated from beginning) ability to use the second script by itself,
A module can be executed as a standalone script (if you want to code it that way) in addition to using it in the normal manner by loading it via a use or require statement. Using it as a standalone script is very unusual and usually signifies a poor design choice.
As Bill already pointed out, we can't really provide you with the best answer because you haven't provided the proper info about what you're doing/needing. Bill's solution guess which appears to be what you wanted, but is not necessarily the best solution, was just that; a guess. It was not based on a clear understanding of what you needed.
The fact that you posed your question on 3 different forums and expected everyone to guess like Bill did is clear evidence that you posed an XY problem/question.
(This post was edited by FishMonger on Mar 3, 2018, 8:34 AM)