if ( $num !~ /^\d{1,7}$/ or $pfx !~ /^(?: ABC(?:D|-M)- | XYZ(?:\s[UV])? (?:\s\d{1,3} (?:\sST)? )? )$/x ) { warn "Bad input at line $.\n"; next; }