in reply to Re: Re: Re: Re: Redirect file write from external program to STDOUT
in thread Redirect file write from external program to STDOUT
Usiing CON as the filename will only get the output to the command line. To capture it into the program you should use open instead. Something like
open IN, "echo $script | $program |" or die $!; binmode IN; my $img = do{ local $/; <IN> }; close IN;
See perlopentut for the details of grabing program output using open. This is necessary as you will need to use binmode to prevent the stream being interupted by ^Z.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Re: Redirect file write from external program to STDOUT
by chunlou (Curate) on Jun 26, 2003 at 23:36 UTC |