no warnings 'regexp'; ($str0 ^ $str1) =~ /^((??{chr(0)})*)/; $commonLen = $+[0];