in reply to Re: Changing STDIN to tty
in thread Changing STDIN to tty

Probably reading open is all that is needed :-)

There's a snippet of code which shows how to dup, redirect and restore STDOUT and STDERR. Should be working for STDIN and with Windows also.

Could you check? I don't do/have Windows.

<update> PS: there might be a package on CPAN... :P </update>

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Replies are listed 'Best First'.
Re^3: Changing STDIN to tty
by sgifford (Prior) on Aug 31, 2006 at 16:11 UTC
    Hi shmem,

    Right, I know how to manipulate the filehandles with open, what I don't know is a portable way of saying /dev/tty.

    Thanks!