Figured it out, Timothy had the right idea. The tool was buffering its output!
- B > Makes sense, but that's not it, unfortunately. I tried it and it still > hangs... > > Also, strangely, with the two "\n"s, the next time I try to write to the > filehandle it says the pipe is broken. > > Here's sample output from the tool: > > ************************************** > ralph 2104% yprtool -l 90 0 0 > 50 50 50 <- I type this > 130.000000 -50.000000 -130.000000 <- it outputs this > 40 40 40 <- I type this > 140.000000 -40.000000 -140.000000 <- it outputs this > <- I type a return > > ERROR: Wrong number of inputs in stream. <- and it complains > > Throwing exception (1: "1") at ../src/YprTool.cpp line 192. > Program error...exiting > ************************************** > > - B > > > > > >> >> Just a thought, but this behavior might be caused by Perl buffering your >> output. >> >> Try selecting your file handle and then setting $| to 1. That way Perl >> should send your output immediately. >> >> >> >> >> -----Original Message----- >> From: Bryan R Harris [mailto:[EMAIL PROTECTED] >> Sent: Wednesday, August 24, 2005 1:51 PM >> To: Beginners Perl >> Subject: Re: two way piped open >> >> >> >> And a follow-on question: >> >> Any idea why I have to send the yprtool two "\n"s instead of one to make >> it >> work? With just one it hangs... On the command line, it definitely >> works >> with just one. >> >> <snip> >> >> > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>