Ah, I see.
Thanks for you time ikegami.
The new code works like a charm. Not only does it improve on mine in readability, it appears to be a whole lot more efficient. The load on the machine has gone down!
John
Comment on Re^6: IPC via named pipes, losing some messages
Interesting. Your version only processed data when there's a lull in reading. If the data comes in fast enough, it could be the selects become expensive no-ops and $data .= $buf; builds up to something huge. In my version, I process data as soon as it comes in.