Programming Perl

Programming PerlSearch this book
Previous: 3.2.52 getnetbynameChapter 3
Next: 3.2.54 getpeername

3.2.53 getnetent

setnetent STAYOPEN

These functions do the same thing as their like-named system library routines - see getnetent(3). They iterate through your /etc/networks file, or moral equivalent. The return value in list context is:

($name, $aliases, $addrtype, $net)

In scalar context, getnetent returns only the network name.

Previous: 3.2.52 getnetbynameProgramming PerlNext: 3.2.54 getpeername
3.2.52 getnetbynameBook Index3.2.54 getpeername