use IPC::System::Simple qw( capture capturex ); my $foo = capture("shell command"); my $foo = capturex("program"); my $foo = capturex("program", @args);