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
|
---|
In Section
Seekers of Perl Wisdom