perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From matt <>
Subject Can't pipe to external programs
Date Wed, 07 Nov 2001 10:07:52 GMT
Hey list,

We're trying to turn some xml into a pdf using fop. A wrapper has been
written for fop so that we can pass it xml on the stdin, and get the
pdf from the stdout.

We're using IPC::Open2 to set this up:

use IPC::Open2;
open2(*README, *WRITEME, "$progname");
print WRITEME $thexml or warn "problem writing to $progname: $!\n";
my $pdf = <README>;

and in the logs we're getting:

couldn't print: Broken pipe

The same code works fine as a separate script, so I'm thinking it has
something to do with mod_perl. 

Any ideas? The guide has some examples of forking (that we haven't
tried), but it does say that you can use Open2... We've also tried
using cat(1) as the program to be sure its not fop or our wrapper.

Also, I posted a couple of questions recently, but then accidentally
deleted a digest the day after without reading it - is there an
archive somewhere?



$A='A';while(print+($A.=(grep{($A=~/(...).{78}$/)[0]eq$_}"  A A A  "
=~m{(...)}g)?"A":" ")=~/([ A])$/){if(!(++$l%80)){print"\n";sleep 1}}

View raw message