CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate: Re: [alex5161] In a perl-script trying to execute another perl-script that SETS SOME VARIABLES for caller script: Edit Log



Laurent_R
Veteran / Moderator

Mar 1, 2018, 11:23 PM


Views: 10928
Re: [alex5161] In a perl-script trying to execute another perl-script that SETS SOME VARIABLES for caller script


Quote
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


Quote
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)


Edit Log:
Post edited by Laurent_R (Veteran) on Mar 3, 2018, 2:06 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives