Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to run fop (fop is java program that creates PDFs usnig formatting objects) from inside of a Perl program. I simply use system to run fop and redirect the browser to the newly created PDF. I am able to do this on Apache and IIS5, but not IIS6. In an attempt to find out why this no longer works I've changed system to open.
open (POO, "logfile") or die "Can't open logfile: $!"; my $FOP = "$fop -xsl $XSL -xml $XML -pdf $PDF |"; print POO $FOP; open (HUH, $FOP) or die "Can't run fop: $!"; while (<HUH>) { print POO $_; }
When run I die and get "Bad file discriptor" in $! on the open statment.
$FOP (the command) is correct and executes from the command line. Piping the output works in IIS5 without error.

Does anyone have any idea what IIS6 wants? Or suggestions on what I can do to track this down.

Replies are listed 'Best First'.
Re: system calls
by astroboy (Chaplain) on Feb 25, 2006 at 21:00 UTC
Re: system calls
by turo (Friar) on Feb 26, 2006 at 17:21 UTC

    Which is the value of '$fop'? ...

    open (POO, "logfile") or die "Can't open logfile: $!"; my $FOP = "fop -xsl $XSL -xml $XML -pdf $PDF |"; print POO $FOP; open (HUH, $FOP) or die "Can't run fop: $!"; while (<HUH>) { print POO $_; }
    maybe you must put the entire path to the 'fop' program.

    perl -Te 'print map { chr((ord)-((10,20,2,7)[$i++])) } split //,"turo"'