Use sysread. You might want to use the IO:Select module to check if the call will block before calling... gives you a bit more control.
Cheers, john > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Foo Ji-Haw > Sent: Tuesday, December 06, 2005 12:30 PM > To: perl-win32-users@listserv.ActiveState.com > Subject: Inet::Socket::INET's line read fails > > > 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 > _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs