$string = decode_utf8 encode_utf8 $string;
(right before the print "$string\n";) worked for me. (don't forget to use Encode;)

Update:
utf8::upgrade $string;
also worked for me (Dumped before and after the upgrade):
Panic Button SV = PV(0x8154b00) at 0x8153c28 REFCNT = 2 FLAGS = (POK,pPOK) PV = 0x816ffd8 "Panic Button"\0 CUR = 12 LEN = 16 SV = PV(0x8154b00) at 0x8153c28 REFCNT = 2 FLAGS = (POK,pPOK,UTF8) PV = 0x816ffd8 "Panic Button"\0 [UTF8 "Panic Button"] CUR = 12 LEN = 16 Bot\U00F3n de P\U00E1nico SV = PVMG(0x81a8af0) at 0x8153d48 REFCNT = 2 FLAGS = (SMG,POK,pPOK) IV = 0 NV = 0 PV = 0x820ad90 "Bot\363n de P\341nico"\0 CUR = 15 LEN = 16 MAGIC = 0x820fb98 MG_VIRTUAL = &PL_vtbl_mglob MG_TYPE = PERL_MAGIC_regex_global(g) MG_LEN = -1 SV = PVMG(0x81a8af0) at 0x8153d48 REFCNT = 2 FLAGS = (SMG,POK,pPOK,UTF8) IV = 0 NV = 0 PV = 0x81c5ee8 "Bot\303\263n de P\303\241nico"\0 [UTF8 "Bot\x{f3}n d +e P\x{e1}nico"] CUR = 17 LEN = 18 MAGIC = 0x81b1d50 MG_VIRTUAL = &PL_vtbl_utf8 MG_TYPE = PERL_MAGIC_utf8(w) MG_LEN = 15 MAGIC = 0x820fb98 MG_VIRTUAL = &PL_vtbl_mglob MG_TYPE = PERL_MAGIC_regex_global(g) MG_LEN = -1
[]s, HTH, Massa (κς,πμ,πλ)

In reply to Re: Convert hex to UTF-8 by massa
in thread Convert hex to UTF-8 by frevo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.