10

I'm trying to figure out how to start a background process in a perl script (on Windows). In other words, I don't want the script to wait for the child process to complete before regaining control. Is there an easy way to do this in just a few lines of code? I've looked at perldoc for the system command, but it doesn't seem to do what I want..

rjzii
  • 14,236
  • 12
  • 79
  • 119
pepsi
  • 6,785
  • 6
  • 42
  • 74

2 Answers2

14

See system in perlport: "system(1,@args) spawns an external process and immediately returns its process designator, without waiting for it to terminate...(Win32)"

cjm
  • 61,471
  • 9
  • 126
  • 175
ysth
  • 96,171
  • 6
  • 121
  • 214
1

Try using Win32::Job.

shawnhcorey
  • 3,545
  • 1
  • 15
  • 17