Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Unicode Conversionby panky245 (Initiate) |
on Jun 04, 2008 at 10:15 UTC ( [id://690097]=perlquestion: print w/replies, xml ) | Need Help?? |
panky245 has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I am a newbie in Perl. Does anybody seems an error in my following snippet. I am regularly getting the compilation error in it. $char_lpar = "\x{00028}"; $char_rpar = "\x{00029}"; my $decval_1 = ord $char_lpar; my $decval_2 = ord $char_rpar; $data =~ s/$char_lpar/sprintf("%.4x;", $decval_1)/ge; $data =~ s/$char_rpar/sprintf("%.4x;", $decval_2)/ge; Best, Pankaj Chaturvedi
Back to
Seekers of Perl Wisdom
|
|