Thread Warum Fehler bei gethostbyname ...? (5 answers)
Opened by jan99 at 2015-03-17 12:07

Raubtier
 2015-03-17 13:26
#180168 #180168
User since
2012-05-04
1076 Artikel
BenutzerIn
[default_avatar]
Die Vermutung ist wohl eher, dass das hier das Problem ist (fett markiert):

Aus perldoc -f gethostbyname
Quote
These routines are the same as their counterparts in the system C library. In list context, the return values from the various get
routines are as follows:

($name,$passwd,$uid,$gid,
$quota,$comment,$gcos,$dir,$shell,$expire) = getpw*
($name,$passwd,$gid,$members) = getgr*
($name,$aliases,$addrtype,$length,@addrs) = gethost*
($name,$aliases,$addrtype,$net) = getnet*
($name,$aliases,$proto) = getproto*
($name,$aliases,$port,$proto) = getserv*

(If the entry doesn't exist you get an empty list.)


Somit wird dein $name_of_this_machine undef und du bekommst die Warnung.

View full thread Warum Fehler bei gethostbyname ...?