You can use the qx operator or backticks to do pretty much the same thing as system, but it'll capture the STDOUT (it doesn't capture STDERR though).
use warnings; use strict; my $stdout = qx{ git status }; # or `git status` ...
See Quote and Quote-Like Operators in perlop.
In reply to Re: Capturing bash output without displaying STOUT in terminal
by stevieb
in thread Capturing bash output without displaying STOUT in terminal
by edimusrex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |