How to print out the hexadecimal content of one text using Perl binmode?
<p>Can someone tell me how <strong>binmode</strong> in Perl can be used to achieve the same function as following one-liner, so as to print out the hex data of one text ?</p>

<pre><code>$ perl -nle 'print map {sprintf "%02X",ord} split //'
</code></pre>

<p>For example, if I input "abcABC", the output will be "616263414243".</p>

<p>Please give a similar one-liner using binmode.</p>

<p>Thanks.</p>