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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.