title: How can I create an anonymous hash from an existing hash in Perl?
body: <p>How can I create an anonymous hash from an existing hash?</p>
  
  <p>For arrays, I use:</p>
  
  <pre><code>@x = (1, 2, 3);
  my $y = [@x];
  </code></pre>
  
  <p>but I can't find how to do the same for a hash:</p>
  
  <pre><code>my %x = ();
  my $y = ???;
  </code></pre>
  
  <p>Thanks</p>