in reply to Can I run a piece of code like child process?

I honestly have not checked the overhead on win32::process, and most people seem to be against it but I use:
use Win32::Process; @servers=('server1','server2','server3'); sub ErrorReport{ print Win32::FormatMessage( Win32::GetLastError() ); } foreach $server (@servers){ Win32::Process::Create($ProcessObj, "c:\\perl\\bin\\perl.exe", "perl.exe c:\\script.pl -s$server", 0, NORMAL_PRIORITY_CLASS, ".")|| die ErrorReport(); #$ProcessObj->Suspend(); #$ProcessObj->Resume(); #$ProcessObj->Wait(INFINITE); }
With the wait remmed out, the sub will not wait for the process.