summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorJohn D Groenveld <groenvel@cse.psu.edu>1997-05-06 13:41:12 -0400
committerChip Salzenberg <chip@atlantic.net>1997-05-08 00:00:00 +1200
commitbfd13ef816abf16369321d26f2f63772eff5cd21 (patch)
tree177cde1735bce91951e98e47f5df81f65b40328b /pod
parent7beaa944e7028109fa98a93b80adb33f30aaf43a (diff)
downloadperl-bfd13ef816abf16369321d26f2f63772eff5cd21.tar.gz
perlfaq9, hostname
Simple patch... p5p-msgid: 199705061741.NAA22777@cse.psu.edu
Diffstat (limited to 'pod')
-rw-r--r--pod/perlfaq9.pod2
1 files changed, 1 insertions, 1 deletions
diff --git a/pod/perlfaq9.pod b/pod/perlfaq9.pod
index f4f4759ba5..d7faca02e3 100644
--- a/pod/perlfaq9.pod
+++ b/pod/perlfaq9.pod
@@ -295,7 +295,7 @@ give you the hostname after which you can find out the IP address
use Socket;
use Sys::Hostname;
my $host = hostname();
- my $addr = inet_ntoa(scalar(gethostbyname($name)) || 'localhost');
+ my $addr = inet_ntoa(scalar(gethostbyname($host || 'localhost')));
Probably the simplest way to learn your DNS domain name is to grok
it out of /etc/resolv.conf, at least under Unix. Of course, this