I have redirected STDOUT in a Perl script. Everything I print in my module is redirected to a file. Is there a way to restore STDOUT in a Perl module?
Here is my example
require my_module; open(STDOUT, ">$outlog") || die "Error stdout: $!"; open(STDERR, ">>$outlog") || die "Error stderr: $!"; my_module::my_func(); So I want to print a message on STDOUT in my_module::my_func() function and exit.