Net-Netent

Net::netent(3p) Perl Programmers Reference Guide Net::netent(3p)

Net-Netent

Net::netent(3p) Perl Programmers Reference Guide Net::netent(3p) # Net::netent(3p) Perl Programmers Reference Guide Net::netent(3p) NNAAMMEE # Net::netent - by-name interface to Perl's built-in getnet*() functions SSYYNNOOPPSSIISS # use Net::netent qw(:FIELDS); getnetbyname("loopback") or die "bad net"; printf "%s is %08X\n", $n_name, $n_net; use Net::netent; $n = getnetbyname("loopback") or die "bad net"; { # there's gotta be a better way, eh? @bytes = unpack("C4", pack("N", $n->net)); shift @bytes while @bytes && $bytes[0] == 0; } printf "%s is %08X [%d. ...