February 2012
Intermediate to advanced
1184 pages
37h 17m
English
getnetent
setnetent STAYOPEN
endnetentThese functions iterate through your /etc/networks file. The return value in list context is:
($name, $aliases, $addrtype, $net) = getnetent();
In scalar context, getnetent
returns only the network name. The Net::netent module supports a by-name interface to this function. See
getnetent(3).
The concept of network names seems rather quaint these days; most IP addresses are on unnamed (and unnameable) subnets.