title: How can I do the equivalent of the following in Java
body: <p>I'm converting the following Perl script to Java. Please explain what it does and the best approach via Java.</p>
  
  <pre><code>#!/usr/bin/perl -w
  
  use MIME::Base64;
  use Convert::BinHex;
  
  print encode_base64(pack "H*", "06d8f33b9c3dd94f8f45a5ef0bd54c63f0cd3113b7b5ebae79807041f7e2f8975352367266a926ea8a2a93ca");
  </code></pre>