sysread($rh,$buf,4096) || syslog ( "crit", "$prog : $!" ); if($buf) { my $client_hostname=unpack('a*', $buf); $client_hostname =~ s/\s+$//g; syslog( "crit", "client_hostname=[$client_hostname]" ); } else {