----- Original Message -----
From: Bob Mangold <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 09, 2001 7:43 PM
Subject: perl / php question


> Hello,
>
> I'm not sure if anyone here can help me with this, but at least some
direction
> in where to to look would be great.
>
> I'm using a php script so call (via exec) a perl script. The STDOUT from
perl
> is automatically forwarded through the php script and displayed on the web
> page. My problem however is that if the perl script errors and sends
output to
> STDERR there is no way for me to know that. Everything functions fine on
the
> php side regardless of what perl does.
>
> So what i want to know is if there is a way to tell perl to send
everything
> that would normally go to STDERR to STDOUT? (I can't just change the
filehandle
> because the code is buried somewhere down in a module)
>

Don't know which platform you are on.
You could use Carp::FatalsToBrowser or do:
open (STDERR, ">STDOUT") || die "Can't redirect errors";
STDERR is global so that should do the trick.
Might give some problems on NT though.

Maarten.

Reply via email to