The getservbyname function translates the service port name to its corresponding port number. : getservbyname « Network « Perl






The getservbyname function translates the service port name to its corresponding port number.

   

Format: getservbyname(NAME, PROTOCOL);

($name,$aliases,$port,$protocol)=getservbyname('telnet', 'tcp');

   
    
    
  

Related examples in the same category