title: Is there any way to use a "constant" as hash key in Perl?
body: <p>Is there any way to use a constant as a hash key?</p>
  
  <p>For example:</p>
  
  <pre><code>use constant X =&gt; 1;
  
  my %x = (X =&gt; 'X');
  </code></pre>
  
  <p>The above code will create a hash with "X" as key and not 1 as key. Whereas, I want to use the value of constant X as key.</p>