Thanks for the correction. I wondered how can_read and getline{s} interacted {answer: not at all}. I hear you about not reinventing the wheel and I'll look again at POE.. it seems awfully complicated for something as simple as what I need {basically *nothing* more than an unblocking read} Is there a less complicated package that provides the simple functionality I need?

I confess that I'm a bit surprised that IO doesn't provide that facility. I could see it implementing a version of getline{} that took a timeout and gave you either the line you asked for or an error. I expect that {as you said} that functionality keeps getting reinvented, so it is a bit odd that over the years no one has added that to the IO family.

Many many years ago I wrote a server in Perl and I had to do just as you said: the low-level sub had to read a byte at a time then assemble the response and return a complete line. I only remember it being kinda clunky but worked. And I wish I still had the code I wrote to do that :)


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

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