in reply to Re^2: IPC::open3 obfuscification
in thread IPC::open3 obfuscification

Redirecting is possible, but is very likely to create buffering issues. Printing after every line can cause possible problems if either there are buffering issues, or if 2 questions are asked in a row. There is also the possibility that at some point it asks a non-yes/no question, in which case you need more logic. Try my suggested hack, if that fails you should be able to see the question it trips up on.

About using an API, I know what legacy code can be like but you still can do it. Just put a well-named function call in that line, and go off to write your function somewhere however is best. Then the legacy code is no worse, and you're free to write that function however you see best.

Replies are listed 'Best First'.
Re^4: IPC::open3 obfuscification
by Dcole (Initiate) on Dec 17, 2008 at 17:33 UTC
    So, I am not entirely sure this fixed the problem, but I am optomistic, so I'm going to go ahead and say i fixed it. I redirected output to /dev/null, and I sent my 'yes' to prompts in to STDERR, instaed of STDIN. I don;t know why thye would have done it like that..but..it seems to be the issue. I'll be posting again if that fails to be the answer, haha