Is it possible to run a Perl script

kalyanbl

New Member
Hi folks,

Within Linux I would like Perl script A to launch Perl script B. However, I want script A to continue running without waiting for script B to return.
And I would like B to be totally independent so that when script A ends, script B is still running.

Is this possible? Any suggestion would be appreciated!


Thank you
Kalyan bl
Linux developer
 


Josephur

Windows Forum Admin
Staff member
Premium Supporter
You can append an & at the end of your second script launch like this:

system("/script/myscript.sh $params &");

Or if your running one of this distros that won't let that work you'll have to use fork or Proc::Background.
 


kalyanbl

New Member
Thank you
 


Josephur

Windows Forum Admin
Staff member
Premium Supporter
Your welcome,

If your script is going to be mass distributed between different possible distributions I highly recommend learning fork.
 


This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.
Top