Perl IP address validation routines