programming-examples/perl/Network/The getservbyname function translates the service port name to its corresponding port number.pl

3 lines
107 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#Format: getservbyname(NAME, PROTOCOL);
($name,$aliases,$port,$protocol)=getservbyname('telnet', 'tcp');