Depending on what your answers are will change how many short-cuts you can take.
If this is just a simple app that reads a line based datastream from just the one socket then you can do
while(<$clientfd>) { last if /^EOS$/; # process line } close($clientfd);
But if you want to read from more than one socket at a time then you will need to use sysread and select
In reply to Re: Input of a Data Stream
by gbarr
in thread Input of a Data Stream
by basicdez
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |