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
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |