February 2012
Intermediate to advanced
1184 pages
37h 17m
English
getservbynameNAME,PROTO
This function 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:
# 0 1 2 3
($name, $aliases, $port_number, $protocol_name) = getservbyname("www", "tcp");In scalar context, getservbyname returns only the service port
number. The Net::servent module supports a by-name interface to this function. See
getservbyname(3).
Read now
Unlock full access