... if( $lclient->connected ){ ## I'm assuming that the setsockopt implementation on your system ## will build the appropriate struct timeval from 15.0 setsockopt( $client, SOL_SOCKET, SO_RCVTIMEO, 15.0 ) or $!; while( <$lclient> ) { ...