Reference: getservbyname
Author: Ellen Siever, Stephen Spainhour & Nathan Patwardhan
Date: 1999-07-02T01:35:56Z

#

| Chapter 5 Function Reference |

## getservbyname

    getservbyname name, proto

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.

Reference: getpwuid |  | Reference: getservbyport