Eradicatore has asked for the wisdom of the Perl Monks concerning the following question:
things work pretty much until the program tries to get the user to type 'y' or 'n' for example if it needs to ask if it can overwrite a file of the same name. In this case, the carriage return doesn't happen, so the while loop is stuck. I thought about setting $| to zero, but that didn't seem to help. Do I have to go down to a loop that works char by char?while ($line = <OUT_STREAM>) { if ($line eq "something") { #do something here } }
Basically this is something like a poor man's Expect, but since I'm working on windows, and I can't get perl Expect module working on windows, I want to use Open3. Any suggestions? Thanks!
Justin Eltoft
"If at all god's gaze upon us falls, its with a mischievous grin, look at him" -- Dave Matthews
Title edit by tye as single-word titles complicate future simple searches
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Open3
by BrowserUk (Patriarch) on Nov 20, 2002 at 20:01 UTC | |
by John M. Dlugosz (Monsignor) on Nov 20, 2002 at 22:30 UTC | |
Re: Open3
by fglock (Vicar) on Nov 20, 2002 at 19:57 UTC | |
by Eradicatore (Monk) on Nov 20, 2002 at 20:13 UTC | |
by BrowserUk (Patriarch) on Nov 20, 2002 at 21:05 UTC |