A very simple question, but I can't easily find an answer.
I want all say in a block to go to a file. But then I want my output to return to STDOUT. How to do that?
my $fh_foo = open "foo.txt", :w;
$*OUT = $fh_foo;
say "Hello, foo! Printing to foo.txt";
$*OUT = ????;
say "This should be printed on the screen";