Created
October 22, 2010 12:43
-
-
Save dynax60/640480 to your computer and use it in GitHub Desktop.
Паковка и распаковка IP-адреса
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ perl -MSocket -le 'print unpack("N", inet_aton(shift))' 127.0.0.1 | |
2130706433 | |
$ perl -MSocket -le 'print inet_ntoa(pack("N", shift))' 2130706433 | |
127.0.0.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment