Net::protoent(3p) Perl Programmers Reference Guide Net::protoent(3p)
Net::protoent(3p) Perl Programmers Reference Guide Net::protoent(3p) # Net::protoent(3p) Perl Programmers Reference Guide Net::protoent(3p) NNAAMMEE # Net::protoent - by-name interface to Perl's built-in getproto*() functions SSYYNNOOPPSSIISS # use Net::protoent; $p = getprotobyname(shift || 'tcp') || die "no proto"; printf "proto for %s is %d, aliases are %s\n", $p->name, $p->proto, "@{$p->aliases}"; use Net::protoent qw(:FIELDS); getprotobyname(shift || 'tcp') || die "no proto"; print "proto for $p_name is $p_proto, aliases are @p_aliases\n"; DDEESSCCRRIIPPTTIIOONN # This module's default exports override the core ggeettpprroottooeenntt(()), ggeettpprroottoobbyynnaammee(()), and ggeettnneettbbyyppoorrtt(()) functions, replacing them with versions that return "Net::protoent" objects. ...