in reply to Re: Escaping Wide Characters
in thread Escaping Wide Characters

thanks for the reply. how do you eval it? for example, this does not seem to work:
my($x,$y) = ('\x{263a}',undef); eval '$y = $x';
and this does not compile:
my($x,$y) = ('\x{263a}',undef); $y = eval($x);
what am i doing wrong?

Replies are listed 'Best First'.
Re^3: Escaping Wide Characters
by almut (Canon) on Mar 05, 2008 at 18:10 UTC

    You need to put double quotes around the string, e.g.

    my $x = '\x{263a}'; my $y = eval '"'.$x.'"'; # or my $y = eval "\"$x\"";
Re^3: Escaping Wide Characters
by ikegami (Patriarch) on Mar 05, 2008 at 18:10 UTC