To execute a shell command, you need a shell.
Like system
, open3
has the following calling convention:
open3(..., ..., ..., $SHELL_COMMAND)
open3(..., ..., ..., $PROG, @ONE_OR_MORE_ARGS)
The following shouldn't invoke a shell:
my @command = ('perl', '-e', '$| = 1; for (1..60) { print q{.}; sleep 1 }');
my $pid = open3($in, $out, $err, @command);