in reply to how does print know what filehandle to use, when in a diamond in-place edit loop?

You can get the current selected filehandle by:
select(my $selected = select(my $dummy)); print $selected;
You may get the name of a glob (e.g. "main::ARGVOUT") or a globref, depending on what was passed to select before.
  • Comment on Re: how does print know what filehandle to use, when in a diamond in-place edit loop?
  • Download Code