微网站成功案例,网站内容方向,沈阳网站公司哪个好,网页设计与制作教程题库描述
此函数告诉系统您不再希望使用gethostent从hosts文件读取条目。
语法
以下是此函数的简单语法-
endhostent返回值
此函数不返回任何值。
例
以下是显示其基本用法的示例代码-
#!/usr/bin/perlwhile( ($name, $aliases, $addrtype, $length, addrs)gethostent() ) …
描述
此函数告诉系统您不再希望使用gethostent从hosts文件读取条目。
语法
以下是此函数的简单语法-
endhostent返回值
此函数不返回任何值。
例
以下是显示其基本用法的示例代码-
#!/usr/bin/perlwhile( ($name, $aliases, $addrtype, $length, addrs)gethostent() ) {print Name $name\n;print Aliases $aliases\n;print Addr Type $addrtype\n;print Length $length\n;print Addrs addrs\n;
}sethostent(1);while( ($name, $aliases, $addrtype, $length, addrs)gethostent() ) {print Name $name\n;print Aliases $aliases\n;print Addr Type $addrtype\n;print Length $length\n;print Addrs addrs\n;
}endhostent(); # Closes the database;执行上述代码后,将产生以下输出-
Name ip-50-62-147-141.ip.secureserver.net
Aliases ip-50-62-147-141 localhost.secureserver.net localhost.localdomain localhost
Addr Type 2
Length 4
Addrs
Name ip-50-62-147-141.ip.secureserver.net
Aliases ip-50-62-147-141 localhost.secureserver.net localhost.localdomain localhost
Addr Type 2
Length 4
Addrs Perl 中的 endhostent函数 - 无涯教程网无涯教程网提供描述此函数告诉系统您不再希望使用gethostent从hosts文件读取条目。 语法以下是此函数...https://www.learnfk.com/perl/perl-endhostent.html