#!/usr/bin/perl -w use Socket; # 64.37.148.0/22 and 63.241.40.0/22 my @list = qw(64.37.148. 64.37.149. 64.37.150. 64.37.151. 63.241.40. 63.241.41. 63.241.42. 63.241.43.); my ($i, $j, $addr, $name); foreach $i (sort @list) { for $j (1 .. 254) { $addr = inet_aton("$i" . "$j"); $name = gethostbyaddr($addr, AF_INET); print inet_ntoa($addr) . "\t$name\n" if (defined($name)); } }