Re: how to get the output from: Win32::Process::Create
- From: joez3@xxxxxxxxx
- Date: 31 Aug 2006 12:27:33 -0700
Paul Lalli wrote:
joez3@xxxxxxxxx wrote:
Hi all,
This might be more a windows question then perl, but lets see if
someone can help me out. I am using Win32::Process::Create to start up
an exe. I can get exe to start, but I need to get what is put out on
the command prompt.
If i try text.exe > temp.txt I can start the exe and the temp.txt file
gets created, but nothing is in it. The text is put in another command
prompt window. So this rules out using system () to start the exe.
Is there any particular reason you're not just using backticks?
perldoc perlop
(search for qx)
Paul Lalli
Hi Paul,
I am not sure what the backticks buy me, i can start up the exe with
the Process::Create. Maybe i should have said more about the exe under
test, its a program that will stay up untill I kill it. By using the
Process::Create I can get the pid and use that to kill it. With the
backticks I tried the following:
open (FHCMD, `start test.exe`." | ");
while (<FHCMD>) {
print $_;
}
This starts the test.exe, but it ends up hanging the perl script and I
can't get the contents of FHCMD.
What should I try next?
Thanks,
zim
.
- Follow-Ups:
- Re: how to get the output from: Win32::Process::Create
- From: Paul Lalli
- Re: how to get the output from: Win32::Process::Create
- References:
- how to get the output from: Win32::Process::Create
- From: joez3
- Re: how to get the output from: Win32::Process::Create
- From: Paul Lalli
- how to get the output from: Win32::Process::Create
- Prev by Date: Re: how to get the output from: Win32::Process::Create
- Next by Date: Re: how to get the output from: Win32::Process::Create
- Previous by thread: Re: how to get the output from: Win32::Process::Create
- Next by thread: Re: how to get the output from: Win32::Process::Create
- Index(es):
Relevant Pages
|
|