1

In the following example, I can get both the error stream and the output stream to a variable when using the call operator. $command is an external program.

$output = & $command $args 2>&1

The redirection does not provide any information to help.

However, I want only the error output. How can I do this?

Panda TG Attwood
  • 1,298
  • 2
  • 14
  • 29

0 Answers0