If you are going to do that, then you need to unescape the backslashes as well! While you can do that via (something close to one of these):
I find that having to escape your backslashes only when they preceed a (desired) newline to be confusing so I'd go with japhy's excellent sugestion or perhaps: s#\\([\\n])# $1 eq "n" ? "\n" : $1 #ge - tye (but my friends call me "Tye")s#(?<!\\)((?:\\\\)*)\\n# '\\'x(length($1)/2) . "\n" #ge; # or s#(?<!\\)(\\*)\1\\n#$1\n#g;
In reply to (tye)Re: reverse quotemeta?
by tye
in thread reverse quotemeta?
by sparky8342
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |