# Build a regular expression: my $regex = qr/ord(226)/i; # Use it to alter $string: $string =~ s/$regex/'/g;