my $variable; close STDERR; open (STDERR, '>', \$variable) or die("Can't open STDERR: $!");