in reply to Find a networked computer name

I don't know how portable this is. I'm on Unix. Also, this code needs checking of system call return values before serious use!
use Sys::Hostname; use Socket; my $hostname = gethostbyaddr(gethostbyname(hostname()),AF_INET); print "$hostname\n";

Update: The reason I included the calls to gethostby* is in case you want the domainname also. hostname() from Sys::Hostname doesn't always include that.

-- 
dempa