http://qs321.pair.com?node_id=246075


in reply to replacing pipe "|"

The pipe character (|) means alternation inside a regex. It needs to be escaped. Try s/\Q$rem\E/$rep/g.

--- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';