Mar 2, 2018, 8:31 AM
Re: [alex5161] In a perl-script trying to execute another perl-script that SETS SOME VARIABLES for caller script
My point is in position: if a script is in Perl, it is sounds foolishly to have another 'piece of the Perl-code' be a separate process, unless it is decided!Your solution creates a separate process, which you seem to dislike but also think it's the best solution, whereas my suggested module solution doesn't create a separate process and is cleaner and easier to understand and maintain.
After all, the second script could be just copied into the first one. Why would that be a "bad way" to resolve it? If written properly i.e., using various subs and/or an embedded module, having everything in a single script/file could be a good choice and it's not uncommon. It really depends on the size and complexity of the code.
That is another 'bad way' to resolve it, besides a file.
(This post was edited by FishMonger on Mar 2, 2018, 8:36 AM)