Mailing List Archive

hm....
Currently, assigned a typeglob ref to a typeglob makes
no sense:

$STDIN = "stdin";
$TTY = "tty";
local *TTY = \*STDIN; # no error, no output
print "$TTY says: ";
print scalar <TTY>;

That code has to be

$STDIN = "stdin";
$TTY = "tty";
local *TTY = *STDIN;
print "$TTY says: ";
print scalar <TTY>;

But I wonder why it shouldn't somehow work to localize
just the filehandle. Of course, now I'm confusing GVs
with PVIOs, which might not be good.

--tom

--tom
Re: [PERL] hm.... [ In reply to ]
Re: hm.... [ In reply to ]
Tom Christiansen writes:
>
> But I wonder why it shouldn't somehow work to localize
> just the filehandle. Of course, now I'm confusing GVs
> with PVIOs, which might not be good.
>

as current FileHandle::DESTROY shows :-(. (See my postings of some
time ago for details).

Ilya