Hi,
I'm curious to know what happens in the following circumstances:
open PROG,"run myprog.exe|" or die "Failed to spawn\n$!\nstopped";
while (<PROG>)
{
.
.
.
}
Suppose myprog.exe bombs out with a fatal error. The message presumably goes
into the pipe and is fed to the <PROG> filehandle. However, it would be
incredibly useful to also capture this information in a file. The normal way
to achieve this is to redirect SYS$ERROR. I can achieve this by putting a
DCL wrapper round the program (ugh!).
I was just wondering if there was some syntax that would let perl's open do
this for me.
I was also wondering what actually happens to SYS$ERROR here. Does it go to
NL:? Does it also go down the same pipe?
Ivor.