Ilkka Naulapää wrote: > hi all, > > I'm quite new with perl and so far i've managed to get all done i've > needed to. But now I have a problem i need some help with. I need to > pipe *huge* output from one program into my perl script and i want to > start processing it right away without waiting this 'source' > finishing its job. It seems to be that reading with <> -operation > waits until this feeder process is done before getting into business.
No, that's not the case. Something else is going on. The <> operation blocks until the line-terminator is read (defined by the $/ variable, and normally "\n"), or until eof is seen. What do you have $/ set to? Is the first program buffering its output? By default, stdout is block buffered unless it's connected to a tty, which means no output will be available until a (system-dependent) number of bytes have been written. If you don't have control over the first program, you can achieve line buffering by using a pseudo-tty. See the Expect or IO::Pty modules. I doubt this will be necessary though. > So how to eliminate that wait? > > thanks in advance. > > Digir -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]