title: Perl, JSON, and Discord Emoji
body: <p>I have a very simple <code>DiscordBOT</code> doing some administrative tasks.
  One of the features is (or should be) our "<code>emoji based polls</code>". We make a post, with emojis listing the options complete with arrows pointing down to the right "reaction" below the comment.</p>
  
  <p>The idea was to make the bot (on command) duplicate the given reactions to the post, so that the admin can remove his/her reactions, and actually slap a  reaction to the option they'd like to vote fore.</p>
  
  <p>Everything works fine... until the error of:</p>
  
  <pre><code> {"code": 10014, "message": "Unknown Emoji"}
  </code></pre>
  
  <p>The perl script, by the powers of LWP, <strong>reads</strong> the reactions from the test post as "<code>\ud83d\ude0f</code>", but putting them back "as is" just doesn't work.</p>
  
  <p>Putting the same reaction back as "<code>\x{1F60F}</code>" instead works fine! (source: <a href="https://codepoints.net/U+1F60F?lang=en" rel="nofollow noreferrer">https://codepoints.net/U+1F60F?lang=en</a> )</p>
  
  <p>I don't mind, except ... how do I convert all those <code>\u-based emojis to \x-based ones? =P</code>
  After some heavy googling and trial-and-error I've tried things such as "decode_json/encode_json" etc, but I can't seem to be able to make it work. I'm thinking I must missing something small and "obvious"...</p>
  
  <p>Thanks for any assist!</p>
  
  <p>Also open for other "outside the box" ideas if they solve the problem! =P</p>