use Socket; my $iaddr = inet_aton("192.168.1.100"); print unpack('N', $iaddr), "\n";