in reply to small help with map function

Using split "regex" does backslash interpretation first. Then when the regex is compiled, it sees m/(, |\p=n-\)/ with the right parenthesis escaped. Use split /regex/ instead.

You should avoid using a quoted string as the first parameter to split, except for the special split " " form. It leads to people forgetting that it's actually a regex and doing split "|", etc. (though that's not quite what you've run into).