in reply to Getting "uninitialized value" that I can't figure out...

Looks like gethostbyip returns undef which means gethostbyaddr returned undef.

Not every IP address has a name associated with it. gethostbyip should return the IP address in that case.

Or maybe there was a DNS error while looking up the host name.