in reply to Re: Use of Typeglob
in thread Use of Typeglob

When used as a tied file handle:
  • I think you have no choice but to use a typeglob if you want a tied file handle.
As of 5.8.0, filehandle ties are attached to the IO handle, not the typeglob, so you can tie even globless lexical filehandles:
use Tie::Handle; use Symbol "geniosym"; my $fh = geniosym; tie *$fh, "Tie::StdHandle" or die; print tied(*$fh);
The * is required only to let tie/tied know you want a filehandle tie, not a scalar tie; no actual typeglobs are used, except temporarily.