programming-examples/perl/Network/The getprotobyname takes the protocol name as an argument and returns its name, any aliases, and its protocol number.pl
2019-11-15 12:59:38 +01:00

4 lines
153 B
Raku

# Format: getprotobyname(NAME);
($name, $aliases, $proto ) = getprotobyname('tcp');
print "name=$name\taliases=$aliases\t$protocol number=$proto\n";