
xsustek
New User
Dec 2, 2010, 6:43 PM
Post #1 of 2
(467 views)
|
|
Non-blocking read from a pipe
|
Can't Post
|
|
Hi, is it possible to do a non-blocking read from a pipe in perl? Something like this.
open(P, "myApp |") || die "Can't create pipe: $!"; while (1) { if (isSomethingReadyToReadOnPipe(P)) { $line = <P>; # do stuff with output line of pipe } else { # do something else } }
|