1 2
open my $old_stderr, ">&STDERR"; open(STDERR, '>', 'NUL') or die $!;
open STDERR, '>&', $old_stderr;