AcidHawk has asked for the wisdom of the Perl Monks concerning the following question:
$num = `$prog_path/prog.exe $srvname $state $fault`
The prog.exe returns a number that I want to catch in $num.
I would like to use Win32::Process::Create. The reason is that I would like to utilise the $ProcessObj->Wait($timeout) feature and kill the process if it times out. My problem... I have no idea how to get the number that the prog.exe returns back to $num.
This is what I have tried.
$num = Win32::Process::Create($ProcessObj, $prog_path/prog.exe, prog $ +srvname $state $fault,0,DETACHED_PROCESS);
The above code WITHOUT the $num = runs the program as a seperate process, but I need the number that is returned...
any ideas..?
Many Thanks
Sean
-----
Of all the things I've lost in my life, its my mind I miss the most.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32 Process Output
by dada (Chaplain) on Jul 18, 2002 at 10:40 UTC |