my $shiftjis = qr{ [\x30-\x39] | [\x41-\x59] | [\x61-\x7A] | [\x82-\x83][\x3F-\xFE] | [\x88][\x9E-\xFE] | [\x89-\xE9][\x3F-\xFE] | [\xEA][\x3F-\x9F] }x; #### while(){ chomp(); # Oops, nope -- variable-length lookbehind: # s/(?!$shiftjis).(?