sub ip2hex{ return "0x" . join ("", map {sprintf "%x", $_} split(/\./,shift)); }