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

Posted by gameover on Stack Overflow See other posts from Stack Overflow or by gameover
Published on 2010-03-17T10:34:09Z Indexed on 2010/03/17 14:31 UTC
Read the original article Hit count: 209

Filed under:
|
|

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 stdout only.
  2. Run prg, get its stderr only.
  3. Run prg, get its stdout and stderr, separately.

© Stack Overflow or respective owner

Related posts about perl

Related posts about stdout