just replace it
$x = '\n'; $x =~ s/(?<!\\)\\n/\n/g; print $x;
Update: Well, I was first but I had to pay my price :) - as suaveant correctly pointed out, you have to take care of the special case of an escaped escape so I fixed that.
What would be interesting is a simple general solution which does that transformation not only for \n but also \t, \cC, \xFF, ... but I'm lost there. Anybody??
-- Hofmator
In reply to Re: reverse quotemeta?
by Hofmator
in thread reverse quotemeta?
by sparky8342
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |