How can I run an external command and capture its output in Perl?

后端 未结 4 1897
南旧
南旧 2020-12-06 00:34

I\'m new to Perl and want to know of a way to run an external command (call it prg) in the following scenarios:

  1. Run prg, get its
4条回答
  •  醉话见心
    2020-12-06 01:05

    You can use IPC::Open3 or IPC::Run. Also, read How can I capture STDERR from an external command from perlfaq8.

提交回复
热议问题