my $null=File::Spec->devnull(); open STDERR,'>',$null or die "Could not open '$null': $!"; # no close() before open(), open() takes care of closing STDERR at the right time