I have a simple perl server (on Linux) & I am trying to emulate a
device that expects <etx> HEX 3 as the record separator. The default
separator is newline. How do I change this to HEX 3 ?
I am using:
--------------------------------------------------------
$local = IO::Socket::INET->new(
Proto => 'tcp', # protocol
LocalAddr => 'localhost:1234',
Reuse => 1 ) or die "$!";
$local->listen(); # listen
$local->autoflush(1); # To send response immediately
my $addr; # Client handle
while ($addr = $local->accept() )
{ # receive a request
while (<$addr>)
{ # Read messages from client
------------------------
Thanks, Peter.
perldoc perlvar
That document lists perl's special variables, including
the INPUT_RECORD_SEPARATOR and OUTPUT_RECORD_SEPARATOR