Hi all,

Just want to share and ask something about reading from the sockets.
Normally my connection to the Other Side receives line inputs. But not all the time the eol character is standard across the various remote connections; sometimes it's just a 0x0D.

I realise that <$socket> does not always work, even with $/=char(13). The safest way so far seems to be 'doing it yourself' with a loop repeating getchar() calls until you hit the expected EOL character. It works, but I suspect the high hit rate on the function call is not optimal.

If anyone has a better idea (or my $/=char(13) is just plain wrong), please reply. Thanks.
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to