$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 reply to Re: Unicode Conversion
by haoess
in thread Unicode Conversion
by panky245
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |