- #!/usr/local/bin/perl
- $|=1;
- $host = (shift || 'sd.cache.nlanr.net');
- $port = (shift || '3131');
- require "$ENV{'HARVEST_HOME'}/lib/socket.ph";
- $sockaddr = 'S n a4 x8';
- ($name, $aliases, $proto) = getprotobyname("udp");
- ($fqdn, $aliases, $type, $len, $themaddr) = gethostbyname($host);
- $thissock = pack($sockaddr, &AF_INET, 0, "