> If '\\n' (3 chars) is supposed to map to a single newline, what did you want '\n' to map to? '\n' (2 chars) or 'n'?
I don't want '\n' remapped at all. The only three things that I do want remapped are \, \; \\n - everything else should just be left as is.
> A hash isn't necessary if you use y///.
But I'm not trying to replace anything like a list of similar metacharacters. The whole challenge here is that I'm dealing with a set of things that are unlike each other: two sets of literal characters and one that is a literal plus a metacharacter. I'm just wondering if they can be handled by a common mechanism; that's what I'm asking about.
Thank you for trying.
-- Education is not the filling of a pail, but the lighting of a fire. -- W. B. Yeats
In reply to Re^2: Regexes and backslashes
by oko1
in thread Regexes and backslashes
by oko1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |