Fletch gave an excellent response, so I'll leave it at that.
However, in the interest of promoting Good Coding Practices ©, I'd make a few subtle comments about the code.
- Personally, I like using Getopt::Long versus Getopt::Std, as it allows for more verbose options and short ones together.
- Look into Pod::Usage, which is part of the core set of modules. It comes with a pod2usage function that allows you to write POD at the end of your file, and then present it at various levels of verbosity, including an error message if you desire. For such a short script, it might be a bit of overkill, but in a lot of cases, short scripts tend to grow up, and putting in a good solid foundation really allows for one's code to grow nicely, rather than being deliquent hackery.
- Your for loop will iterate from 0 to 254, not 0 to 255. The conditional is that current is less than end, and end is 255, so technically it'll never do the 255th IP.
=)
~Brian