#!/usr/bin/perl -w

sub ip_to_int
{
	my @octs = ($_[0] =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)/);
    my $int_id = $octs[0] << 24;
    $int_id += $octs[1] << 16;
    $int_id += $octs[2] << 8;
    $int_id += $octs[3];
    return $int_id;
}

print "$ARGV[0] = ".ip_to_int($ARGV[0])."\n";
