Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Unicode Conversion

by haoess (Curate)
on Jun 04, 2008 at 10:30 UTC ( #690102=note: print w/replies, xml ) Need Help??


in reply to Unicode Conversion

$char_lpar and $char_rpar get interpolated inside your substitution. You can quote them using the \Q\E construct:

$data =~ s/\Q$char_lpar\E/sprintf("%.4x;", $decval_1)/ge; $data =~ s/\Q$char_rpar\E/sprintf("%.4x;", $decval_2)/ge;

-- Frank

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://690102]
help
Chatterbox?
LanX horror
[Discipulus]: in case of doubt freedom
[LanX]: consideration is a democratic process
[Discipulus]: i'm sure germans has humor: i see them laughing

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2017-04-27 20:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (513 votes). Check out past polls.