in reply to Running a Perl script in the background from another Perl script

Here is how you do it with Win32::Process:
use Win32::Process; Win32::Process::Create($Win32::Process::Create::ProcessObj, 'c:/perl/bin/perl.exe', #path to perl 'perl script.pl', #perl script 0, DETACHED_PROCESS, ".")or die "$!";
  • Comment on Re: Running a Perl script in the background from another Perl script
  • Download Code

Replies are listed 'Best First'.
Re: Re: Running a Perl script in the background from another Perl script
by jplindstrom (Monsignor) on Jul 10, 2001 at 23:05 UTC
    I would try to avoid hard coding the path to perl, using $^X to keep track of the perl binary.

    perldoc perlvar for more info.

    /J

Re: Re: Running a Perl script in the background from another Perl script
by mikeo (Initiate) on Jul 10, 2001 at 22:47 UTC
    Thanks for the quick reply! It works great. -Mikeo