start page | rating of books | rating of authors | reviews | copyrights

Programming Perl

Programming PerlSearch this book
Previous: 3.2.63 getpwuid Chapter 3
Functions
Next: 3.2.65 getservbyport
 

3.2.64 getservbyname

getservbyname 

NAME

, 

PROTO

This function does the same thing as getservbyname (3): it translates a service (port) name to its corresponding port number. PROTO is a protocol name such as "tcp" . The return value in list context is:

($name, $aliases, $port_number, $protocol_name)

In scalar context, getservbyname returns only the service port number.


Previous: 3.2.63 getpwuid Programming Perl Next: 3.2.65 getservbyport
3.2.63 getpwuid Book Index 3.2.65 getservbyport