The error parameter to IPC::Open3::open3
should not be undefined. The synopsis for IPC::Open3
uses the Symbol::gensym
function to pre-initialize the error argument:
my($wtr, $rdr, $err);
use Symbol 'gensym';
$err = gensym;
$pid = open3($wtr, $rdr, $err, 'some cmd and args', 'optarg', ...);
The input and output parameters can be replaced with autogenerated filehandles, so it is OK to pass undef
for those arguments.
Of course the least verbose option to satisfy perlcritic here is
my @o = `ls 2>/dev/null` ## no critic