in reply to IP Address Sanity

Appart from the suggestions from the fellow monks, I should point you at NetAddr::IP. You can very easily see wether something is (or can be converted to) an IP address by saying:

use NetAddr::IP; if (defined NetAddr::IP->new($myip)) { ... Your code goes here ... } else { die "Do not feed me with garbage!\n"; }
Also, you want to accept IP addresses for something. NetAddr::IP makes most of what you might want to do easy. There's also a Tutorial within the monastery about how to do stuff with this.

You can download the module from here or any friendly CPAN mirror.

Disclaimer: I wrote NetAddr::IP so I might be a bit biased :) Best regards

-lem, but some call me fokat