Writes to a pipe are atomic as long as they are short enough.
This atomic size can be found in your systems header files
as the constant PIPE_BUF, and it's defined by posix to be at
least 512 bytes (on linux for example it's 4096 bytes). At
the perl level the constant can be found in POSIX.pm:
perl -wle 'use POSIX; print PIPE_BUF'
So if you make sure that your filehandle to the pipe is
autoflushing (so that perl prints become one write),
the filehandle isn't unbuffered (normally only a problem with STDERR, in that case make sure your print doesn't consist of many pieces) and your message is short enough (<= 512 bytes), you're safe.