Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Is there any way for a script to start another program, like with system(), but that keeps running without having to wait for the other to end?

2001-03-04 Edit by Corion : Moved to SOPW

Replies are listed 'Best First'.
RE: running a program
by le (Friar) on Jun 08, 2000 at 01:35 UTC
    If your operating system allows it, you can do a fork:
    if ($pid = fork); # this is the parent, the script that keeps running; } else { exec "any_program_you_like"; # this is the child which will be replaced with # the other command }
(zdog) RE: running a program
by zdog (Priest) on Jun 08, 2000 at 02:47 UTC
    For future reference, the node you wrote should go into the Seekers of Perl Wisdom section rather than the Perl Monks Discussion section, which happens to be for discussion about the site itself and not Perl.

    -- zdog (Zenon Zabinski)
       Go Bells!!