projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7beaa94
)
perlfaq9, hostname
author
John D Groenveld
<groenvel@cse.psu.edu>
Tue, 6 May 1997 17:41:12 +0000
(13:41 -0400)
committer
Chip Salzenberg
<chip@atlantic.net>
Wed, 7 May 1997 12:00:00 +0000
(
00:00
+1200)
Simple patch...
p5p-msgid:
199705061741
.NAA22777@cse.psu.edu
pod/perlfaq9.pod
patch
|
blob
|
history
diff --git
a/pod/perlfaq9.pod
b/pod/perlfaq9.pod
index
f4f4759
..
d7faca0
100644
(file)
--- 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