I have an HTML file with many numerical entities. I want to change them them from using decimal numbers to hex numbers. For example: I want – (en dash) changed to to –.
How does one do this using Perl?
I have tried using the following code:
use String::HexConvert ':all';
my $text = "this is text–example";
print ascii_to_hex($text);
It will converting the all characters. I want to convert the – only.
Try this: