open(my $fh, '>', 'nul') or die "open nul: $!\n"; my $pid = open3( undef, # Use parent's STDIN '>&'.fileno($fh), # STDOUT = nul undef, # STDERR = STDOUT chcp => 65001, ); waitpid($pid, 0);