On Fri, 22 Oct 2021 at 16:50, Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> wrote: > The "currently selected output filehandle" as used by print/printf is > not so exposed; instead requiring the (honestly-bizarrely named) > select() dance: > > { > my $oldh = select $newh; > print "Things"; # this goes to $newh; > > select $oldh; # restore the old one. > } > > Alternative approach: { local select $newh; print "Things"; }Thread Previous | Thread Next