sub isValidIP { return (shift =~ m/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/ and (($1|$2|$3|$4) < 256)); }