Mar 1, 2018, 11:23 PM
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!
That's the way all operating systems in common use nowadays work. And this is not weird: if you want to run another program while your program is waiting, starting another process is a quite legitimate way to do it
After all, the second script could be just copied into the first one.Yes, if you're not happy with returning a value to the main program, that's exactly what you need to do, one way or another. There are at least half a dozen ways to do that (copy and paste the code, eval, require, use, etc.), but using a module is probably the cleanest and also the easiest.
(This post was edited by Laurent_R on Mar 3, 2018, 2:06 AM)