Help for this page
open($fh, '>', \$variable) || ..
close STDOUT; open STDOUT, '>', \$variable or die "Can't open STDOUT: $!";