title: How do I convert decimal to hexadecimal in Perl?
body: <p>How can I convert a number, <code>$d = 1024</code>, in decimal to 0xFF in hex in Perl?</p>
  
  <p>The <code>d</code> variable needs to be assigned to a different variable and be printed, so for readability I required it to be in hexadecimal format.</p>