I don't even remember what got me thinking that IO::Socket's can be used as file descriptors

Technically they can be used like handles (not descriptors), they're subclasses of IO::Handle. But as you discovered, doing a readline on them is blocking; from my experience I very much prefer non-blocking operations, and those are IMHO best abstracted via an event-based interface.

In terms of example code, I should have been more specific: a Short, Self-Contained, Correct Example.

In reply to Re^3: IO::Socket tutorial by haukex
in thread IO::Socket tutorial by BernieC

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