I offer a simple solution. I suppose that there are backslashes in the original string that are not part of an escape sequence you want to transform, this won't work at least not this way.
s/(\\.)\\/$1@/g; s/\\F@/|/g; s/\\S@/^/g; s/\\T@/&/g; s/\\R@/-/g; s/\\E@/\\/g;
In reply to Re: Pattern Matching, left-to-right
by ambrus
in thread Pattern Matching, left-to-right
by TrekNoid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |