Hello,
I want to capture the output of a command. I use IO::CaptureOutput. In simple programs, it works fine. As soon as I move it into a program running under CGI.pm 3.42, it does not work. See below for details.
use IO::CaptureOutput qw(qxy); ($output) = qxy(qw(/usr/local/bin/blaaaargh)); say "<blaaaargh failed: $output>";
Expected result:
in the browser<blaaaargh failed: /tmp/blaaaargh: Permission denied >
Actual result:
in the browser<blaaaargh failed: >
in the error_log[Wed Nov 05 16:07:39 2008] [error] [client 127.0.0.1] /tmp/blaaaargh: +Permission denied
I also ran the CGI program from the command line with use CGI qw(:debug) and could verify that the error message comes first on STDERR, then comes the normal output on STDOUT (again, with the error message missing).
What do I do?
In reply to capturing output fails under CGI by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |