in reply to Inconsistent transliteration for non-printing octets

Read the perlop manpage, under regex operators. Actually, if you look it up in perlfunc it will point you there.

If the /c modifier is specified, the SEARCHLIST character set is complemented. If the /d modifier is specified, any characters specified by SEARCHLIST not found in REPLACEMENTLIST are deleted.
So, /c is like the [^... in a character class. That means your first example, '3','5', '7', really means everything except those three characters. So, characters \0, \1, and \2 all map to '8'. With the /d flag, anything not in the replacement set (if the replacement set is shorter than the match set) is deleted.

So, the three chars you specified are kept, and everything other than those 6 are deleted. That matches your output: \0 -> '8', \1 -> '8', \2 -> '8', '3' -> '3', '5' -> '5', '7'->'7', and everything else is deleted.

—John