I want to do a computation with
stderr both redirected to files. Here is what I wrote:
open(prefix * ".log", "w") do out open(prefix * ".err", "w") do err redirect_stdout(out) do redirect_stderr(err) do compute(...) end end end end
Is there a better way to write this and reduce the nestedness?