title: How can I reverse a string that contains combining characters in Perl?
body: <p>I have the string <code>&quot;re\x{0301}sume\x{0301}&quot;</code> (which prints like this: résumé) and I want to reverse it to <code>&quot;e\x{0301}muse\x{0301}r&quot;</code> (émusér).  I can't use Perl's <a href="http://perldoc.perl.org/functions/reverse.html" rel="nofollow noreferrer"><code>reverse</code></a> because it treats combining characters like <code>&quot;\x{0301}&quot;</code> as separate characters, so I wind up getting <code>&quot;\x{0301}emus\x{0301}er&quot;</code> ( ́emuśer).  How can I reverse the string, but still respect the combining characters?</p>