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



FishMonger
Veteran / Moderator

Mar 2, 2018, 8:31 AM


Views: 10211
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!

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.


Quote
After all, the second script could be just copied into the first one.
That is another 'bad way' to resolve it, besides a file.

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.


(This post was edited by FishMonger on Mar 2, 2018, 8:36 AM)


Edit Log:
Post edited by FishMonger (Veteran) on Mar 2, 2018, 8:36 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