use warnings; use strict; my $stdout = qx{ git status }; # or `git status` ...