Do it for all packages that * mention perl, or * have a directory name starting with p5-*, or * depend on a package starting with p5- like last time, for 5.18, where this didn't lead to complaints. Let me know if you have any this time.
(Based on pkgsrc-wip) Term::Encoding is a simple module to detect an encoding the current terminal expects, in various ways.