use Encode; # ... $HTML = decode_utf8($HTML);