in reply to Find a networked computer name
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
|
|---|