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
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