in reply to Executing Commands with "open"

The size of the buffer, and the way that anonymous pipes are handled in detail, is dependant on the operating system in use, even assuming UNIX (since your example is ls -l). For example, Linux anonymous pipes have an (invisible) inode generated and are handled by the file system, but not all UNIXs behave in that way.

The size of guaranteed atomic writes is represented by the POSIX constant PIPE_BUF, and it can be retrieved for a given system using the pathconf() or fpathconf() functions in C. It is usual for the value to vary between 1024 and 5120 bytes. In any case it must be at least 512 bytes. However, many applications using, for example, stdio (which perl uses by default) will buffer by text lines, the newline character representing the end-of-record.

Think of using an anonymous pipe as a form of file IO. I'm sure you realise that writing to a file is normally done in units of one buffer (and that is a gross simplification), pipes are handled in a similar way.