Reference: getservbyport (Perl in a Nutshell)

Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: getservbynameChapter 5
Function Reference
Next: Reference: getservent
 

getservbyport

getservbyport port, proto

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: Reference: getservbynamePerl in a NutshellNext: Reference: getservent
Reference: getservbynameBook IndexReference: getservent

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.