in reply to Re: Re: Re: Re: Re: Redirect file write from external program to STDOUT
in thread Redirect file write from external program to STDOUT

If I do this MyPerl.PL > plot.jpeg, isn't this script
`echo $script | $program`;
and this script
open IN, "echo $script | $program |"; binmode IN; my $img = do{ local $/; <IN> }; close IN; binmode STDOUT; print $img;
the same? In any case, the jpeg produced was always something of a dozen bytes size or so, certainly not jpeg.

Since the binmode, open and all technique works with GD, I wonder if that external program simply somehow fails to generate a jpeg properly with CON as filename. Just afraid to waste people time if the problem is totally exogenous to Perl.

Thanks for bearning with me.