sub ntohl { pack("L", unpack("N", $_[0])); } sub ntohs { pack("S", unpack("n", $_[0])); } sub htonl { ntohl(@_); } sub htons { ntohs(@_); }