my $ip = '83.1.1.1'; # turn to 32 bit integer my $ip_int = unpack "N",pack "C4", split/\./,$ip;