in reply to Code for port scanner on range of IPs

IN addition to the comments above,
my %ports = (80,8080,81,8181);
should be:
my @ports = (80,8080,81,8181); ## Array, not hash
You should also consider using a module like NetAddr::IP to manage IP address analysis, and iterating ranges.

In fact, Nmap::Scanner Could probably do the entire job for you very professionally.

             I hope life isn't a big joke, because I don't get it.
                   -SNL