The gethostbyname function returns an entry from the /etc/hosts file for the name of a specific host passed as an argument. : gethostbyname « Network « Perl






The gethostbyname function returns an entry from the /etc/hosts file for the name of a specific host passed as an argument.

   

Format: gethostbyname(NAME);

($name, $aliases, $addtrtype, $length,@addrs)=gethostbyname("dolphin");

   
    
    
  

Related examples in the same category

1.The gethostbyname function searches for an /etc/hosts entry that matches a specified machine name.