Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Is there any difference between the two?
my @output = `./do_sth.out`;
versus
my @output = system("./do_sth.out");
Seems to me they are the same? Please correct me if I'm wrong.

Replies are listed 'Best First'.
Re: Backtick and System Difference
by Zaxo (Archbishop) on Jun 03, 2006 at 19:19 UTC

    Backticks capture and return STDOUT of the child process, while system just returns the exit status.

    After Compline,
    Zaxo

Re: Backtick and System Difference
by bobf (Monsignor) on Jun 03, 2006 at 19:26 UTC