ord doesn't work that way at all, and regular expressions don't either.
Maybe you want this:
my $to_replace = chr(226); $string =~ s/\Q$to_replace/'/gi;
In reply to Re: Using 'ord' in a regular expression for substitution
by Corion
in thread Using 'ord' in a regular expression for substitution
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |