in reply to CGI and Traceroute

suppose you accept only ip addresses:
(changing for hostnames should be trivial..)
why not just
unless($value =~/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) { ##reject this... }