William Slater's
IPv4 Page


Web Page Traffic Counters
precision m6300 notebook
Visitor Count


In 2001, I had some time on my hands, so I was thinking about IPv4 addresses, and decided to write this little program in PERL.  The PERL source code shown in the image below will generate every dotted decimal address in the IPv4 address space.  Note that it uses four FOR loops that are nested. It does not take into account the special types of IP address ranges, such as Private, APIPA, multicast, etc.  It treats them all the same.

As a special feature, it writes each IP address to the screen, and shows its Base 10 equivalent.

If you want to run this code, type it as shown into your favorite text editor.  Then download Active State PERL for your operating system.  Then run the code. 

Please do not e-mail me and request the code.  It runs as shown, and it is not a big effort to type it in using your favorite test editor.


IPv4_with_Base10.pl program source code by William F. Slater, III



IPv4_with_Base10.pl program by William F. Slater, III, running in a command line window.



Trivia fact: You can ping one of these Base 10 numbers and it converts it to an IPv4 dotted decimal number on the fly.



By the way, I have been making a living in IT since July 1977.  If you are curious about that, visit my career page.  Anyway, I have programmed in 30 languages, but I have four favorites:  Visual Basic, PERL, Java, and C++.

Finally, we are running out of IPv4 addresses due to the popularity of IPv4.  Please consider joining and working with the Internet Society to help spread the word about this looming problem.  You can also get a FREE IPv4 address exhaustion countdown by clicking this link.




William F. Slater, III
President, Chicago Chapter of the Internet Society
slater @ billslater .com





Copyright 1996 - 2008 by William F. Slater, III,
Chicago, IL, USA
All Rights Reserved, Nationally and Internationally.

Last Updated: Wednesday, July 01, 2009