On Fri, 22 Oct 2021 at 22:50, Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> wrote: > I propose the addition of a new perlvar; perhaps named > > { > local ${^OUTPUT_HANDLE} = $newh; > print "Things"; > } > Wouldn't the existing STDOUT local() support be more clear for this case? It also has the advantage of working equivalently for STDERR/warn: { local *STDOUT = $newh; print "Redirected"; } { local *STDERR = $newh; warn "Also redirected"; } Or is this aimed more at format-related functionality?Thread Previous | Thread Next