in reply to Capturing bash output without displaying STOUT in terminal
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Capturing bash output without displaying STOUT in terminal
by edimusrex (Monk) on Sep 08, 2016 at 16:14 UTC | |
by stevieb (Canon) on Sep 08, 2016 at 16:18 UTC | |
by Linicks (Scribe) on Sep 08, 2016 at 17:16 UTC | |
by Linicks (Scribe) on Sep 08, 2016 at 18:14 UTC |
In Section
Seekers of Perl Wisdom