in reply to many-to-one pipes

can I test if there is a reader on the pipe before writing to it ?

Assuming you are opening the pipe for write-only, you need to specify O_NONBLOCK on the file handle when you open it, see sysopen and Fcntl. The run-time errno should be set to ENXIO if no process has the pipe open for reading. This is accessable through $! and Errno might also be useful.

Alternatively use non-blocking sockets or message queues.