programming-examples/perl/Network/The getservbyname function translates the service port name to its corresponding port number.pl
2019-11-15 12:59:38 +01:00

3 lines
107 B
Perl

#Format: getservbyname(NAME, PROTOCOL);
($name,$aliases,$port,$protocol)=getservbyname('telnet', 'tcp');