in reply to Changing STDIN to tty

Do
open(STDIN,"</dev/tty")
before the system call - on *nix, that is...

But probably you want to use fork:

open(STDIN,"/dev/null"); #do some ops if((my $pid = fork()) == 0) { # child here open(STDIN,"</dev/tty") or die $!; # do some ops... exit; } else { # parent here - STDIN still is /dev/null # more ops... } # any code hereafter will be executed by parent and, # if the exit in the child block wasn't present, # by the child also

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