Sascha2481 has asked for the wisdom of the Perl Monks concerning the following question:
If i start this program it reads from a PIPE. But it waits so long till the program reads from a PIPE and THEN goes again trough the Loop. But i want that: Go trough loop , read from pipe , sleep 1 second and then start the loop again. I hope you can help me , sorry for my bad english.$|=1; my $recv = 0; while(1) { $recv++; if($recv > 200) { print "<!-- //--> "; undef $recv; } open(FIFO,"<fifo"); my @read = <FIFO>; close(FIFO); foreach(@read) { ............ } sleep 1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Fifos + Pipes
by jonadab (Parson) on Oct 02, 2003 at 13:22 UTC | |
|
Re: Fifos + Pipes
by Anonymous Monk on Oct 03, 2003 at 10:12 UTC |