You are viewing the version of this documentation from Perl 5.8.9. View the latest version

CONTENTS

NAME

Net::protoent - by-name interface to Perl's built-in getproto*() functions

SYNOPSIS

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";