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

Programming Perl

Programming PerlSearch this book
Previous: 3.2.64 getservbyname Chapter 3
Functions
Next: 3.2.66 getservent
 

3.2.65 getservbyport

getservbyport 

PORT

, 

PROTO

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

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

In scalar context, getservbyport returns only the service port name.


Previous: 3.2.64 getservbyname Programming Perl Next: 3.2.66 getservent
3.2.64 getservbyname Book Index 3.2.66 getservent