Can IPC::System::Simple capture STDERR?

On a POSIX system, you can do the following. On Windows, this would work in cygwin.

On a POSIX system, you can do the following. On Windows, this would work in cygwin. My @lines = capture("some command 2>&1"); However, if you want to distinguish STDERR lines from STDOUT lines, maybe you need to use IPC::Open3 or the mis-named IPC::Open3::Util.

You can redirect STDERR (file descriptor 2) to STDOUT (file descriptor 1) with 2>&1. From perlop on the qx// operator: Because backticks do not affect standard error, use shell file descriptor syntax (assuming the shell supports this) if you care to address this. To capture a command's STDERR and STDOUT together: $output = `cmd 2>&1`.

Just to clarify, this tells the shell to redirect filehandle 2 to filehandle 1. Since filehandle 2 is STDERR and filehandle 1 is STDOUT, it does what you want. – Chas.

Owens Nov 6 '10 at 11:42.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions