in reply to Perl launching process

My Rule of Thumb:

  1. If you don't care about exit codes or output, use system().
  2. If you just want the exit code, use system().
  3. If you just want the output or error or both combined, use backticks.
  4. For anything else, use a module.

Replies are listed 'Best First'.
Re^2: Perl launching process
by pwagyi (Monk) on Dec 14, 2018 at 01:12 UTC

    Regarding #3, backtick does not capture stderr by default? Unless shell redirection is used?

      It does not, as a trivial test will confirm.

      $ perl -e 'print "###", `chown foo /`, "###\n"'