Ah, I see. I think the closing of the pipe does it, so <PIPE> works.
Well I say it works, it patently isn't working all the time.
The first two code blocks in my post work as they should.
I've just put a "|| die 'couldn't open';" on the open and it doesn't die, so that isn't the problem
I was under the impression that it worked like this: server opens pipe. This blocks until there is data to read. client opens pipe, writes data, closes pipe. There is a chance that the server doesn't have the pipe open, ie it's servicing a request. (The server has some quick stuff to do, longer requests cause a fork and the main server returns to the event loop) If the server doesn't have the pipe open, the client blocks until the server opens the pipe. If the above is correct, I don't understand why my stuff is failing...