How to capture both STDOUT and STDERR in two different variables using Backticks in Perl

后端 未结 4 1136
陌清茗
陌清茗 2021-02-08 17:15

Let\'s say I want to run an external program from my script with backticks and at the same time I want to capture both STDOUT and STDERR but in two different variables. How can

4条回答
  •  时光说笑
    2021-02-08 17:51

    In the Perl FAQ you have different options depending how do you want to proceed:

    http://perldoc.perl.org/perlfaq8.html#How-can-I-capture-STDERR-from-an-external-command%3f

提交回复
热议问题