in reply to Getting back control..to main script

See, i will tell u what exactly is my problem.. I have a perl script. Thru dat perl script im calling a batch script which will launch an application in vmware. Now once that application starts, i want the control back to my perl script. The perl script gets back the control only after i close the application which is running in the vmware. I want the control back as soon as the application starts or gets launched..
  • Comment on Re: Getting back control..to main script

Replies are listed 'Best First'.
Re^2: Getting back control..to main script
by jethro (Monsignor) on Feb 24, 2011 at 15:15 UTC

    You can do this in perl with fork()+exec(), either directly or through a module like the aforementioned Proc::Background or Parallel::ForkManager. Or you can let the shell do the same trick with backgrounding the process:

    perl -e 'system("emacs &"); print "yes";'