The minimal change is just to make the use of NULL in open no longer a bareword by changing it to *NULL.
It's still usually considered poor form to use handles of this form (Because they are global variables, though you can make them somewhat less global by applying local to them). So I would recommend changing it to instead use my variables for all the handles. It also looks like you're throwing away the stdin filehandle, so that too can be passed the null filehandle (note I'm opening it in read-write mode)
use strict;
use warnings;
use IPC::Open3;
use File::Spec;
use Symbol qw(gensym);
open(my $null, '+>', File::Spec->devnull);
my $childErr = gensym;
my $pid = open3($null, $null, $childErr, "cmd");
while(<$childErr>) { }
waitpid($pid, 0);