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

4 lines
154 B
Raku

# Format: getprotobynumber(NUMBER);
($name, $aliases, $proto) = getprotobynumber(0);
print "name=$name\taliases=$aliases\t$protocol number=$proto\n";