+ -
当前位置:首页 → 问答吧 → 请问一下语句的意思是什么

请问一下语句的意思是什么

时间:2010-12-24

来源:互联网

$ip_start="222.188.0.0";
unpack 'N', inet_aton($ip_start);

求解

作者: ztj2247   发布时间: 2010-12-24

inet_aton 见 Socket 模块文档


QUOTE:
inet_aton HOSTNAME
Takes a string giving the name of a host, and translates that to an opaque string (if programming in C, struct in_addr). Takes arguments of both the 'rtfm.mit.edu' type and '18.181.0.24'. If the host name cannot be resolved, returns undef. For multi-homed hosts (hosts with more than one address), the first address found is returned.



unpack 见 perldoc -f pack


QUOTE:
    N  An unsigned long (32-bit) in "network" (big-endian) order.

作者: zhlong8   发布时间: 2010-12-24