$host_data = (gethostbyname($g_masterserver_address))[4]; my $address = join(".", unpack("C4", $host_data)); my $port = $g_masterserver_port; my $dest = sockaddr_in($port, inet_aton($address)); $msg = chr(0xff).chr(0xff)."Z".chr(0xff); $bytes = send($::s_socket, $msg, 0, $dest); print("$bytes to '$address:$port'");