ЭЛЕКТРОННАЯ БИБЛИОТЕКА КОАПП
Сборники Художественной, Технической, Справочной, Английской, Нормативной, Исторической, и др. литературы.



Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: 8.110 Net::hostentChapter 8
Standard Modules
Next: 8.112 Net::Ping
 

8.111 Net::netent

Returns information for a network. Overrides the core getnetbyname and getnetbyaddr functions with object-oriented versions that return Net::netent objects. The objects have methods that return the fields of the same name from the netent structure in netdb.h:

FieldDescription
addrtypeNet address type
aliasesArray of aliases
nameName of net
netNetwork number

You can access the structure fields either with the methods or by importing the fields into your namespace with the :FIELDS import tag and then accessing them by prepending n_ to the field name:

$net_obj->name()
$n_name
Net::netent exports the following:


Previous: 8.110 Net::hostentPerl in a NutshellNext: 8.112 Net::Ping
8.110 Net::hostentBook Index8.112 Net::Ping