Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IO::Socket->input_record_separator affects <STDIN>

5 views
Skip to first unread message

peter_hum

unread,
Sep 22, 2006, 3:15:22 PM9/22/06
to
Hi,

I wrote a simple socket client to talk to a device that terminates its
replies with a hex \0x02.

IO::Socket->input_record_separator( "\02" );

seems to handle this but I was surprised that this affects more than
just the socket. When I enable the above statment, it screws up a
<STDIN> I have in the script. The <STDIN> won't end until I enter
control-B (which is hex 2).

Is there another way to limit the separator to the socket ?

- Thanks, Peter.

0 new messages