From: C.DeRykus on
On Jul 10, 4:48 pm, Peng Yu <pengyu...(a)gmail.com> wrote:
> Suppose I have a string $x='\t\n', I want to convert it to $y="\t\n".
> I also want to convert $y back to $x. I have googled. But I haven''t
> any related function, maybe because I didn't use the right search
> keywords. Would you please let me know what functions I can use to do
> the conversions?

eval qq{\$y = "$x"; 1} or die $@;

But, I wouldn't necessarily recommend this.
String eval is slow and needs safeguards if
there's user input. See perldoc -f eval and
perldoc perlsec

--
Charles DeRykus