use Win32::Process;
Win32::Process::Create($ProcessObj,
"c:\\Perl\\bin\\perl.exe",
"perl -e \"print q(yr code here\n)\"",
1,
NORMAL_PRIORITY_CLASS,
".")
$a = $ProcessObj->Wait(1000); # units = ms
$ProcessObj->Kill($some_exit_code);
print "[$a] ==> I *think* this will be zero if the " .
" process terminated on its own before Wait() finished\n";
####
$ProcessObj->GetExitCode($exitvalue);
print "The code returned: $exitvalue\n";
####
DETACHED_PROCESS
CREATE_NEW_CONSOLE
DETACHED_PROCESS | IDLE_PRIORITY_CLASS