in reply to escaped \n in regex

Perl doesn't do things to be 'cool'. It does things to be useful. Besides, what 'cool' thing did you expect perl to do with that, anyway?

You embedded a literal newline in your regular expression. That matches newlines in the string you match against as you can see by your test code. Putting a backslash in front of it does nothing since it's not a special character.

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