Well, based on looking at the man page for IO::File, I'd say that what it does is to control whether the file handle involved will perform "blocking i/o" or "non-blocking i/o". Are you looking for an explanation about what this means? If so, you could start by looking at Tk::fileevent...
... Event-driven I/O works best for filehandles that have been placed into nonblocking mode. In blocking mode, a "print" command may block if you give it more data than the under­ lying file or device can accept, and a "<>", "sysread" or "read" command will block if you attempt to read more data than is ready; no events will be processed while the com­ mands block. In nonblocking mode "print", "<>", "sysread" and "read" never block. See the documentation for the individual commands for information on how they handle blocking and nonblocking filehandles.
Non-blocking i/o is totally cool for those situations when it really matters, like "I don't know when that %^&#!! user is gonna hit a key, but as soon as he does, BOY am I gonna whack him!"

update: (A less vindictive application would be a case like a server that may be accepting connections and input data from any number of clients. Once it has one or more clients connected, it merely wants to try to read from each one, and if there's something to read, handle that; otherwise, don't just hang, waiting on a lagging client -- move on! See if there's another connection request, look for input from other clients, keep busy!)


In reply to Re: IO::File->blocking by graff
in thread IO::File->blocking by Flame

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.