title: perl: print a string from a hash that contains a reference to it
body: <p>Sorry if this is a bad title.</p>
  
  <p>I have the following hash:</p>
  
  <pre><code>my %map = (
      'key1', 'hello',
      'key2', \'there'
  );
  print Dumper(\%map);
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>$VAR1 = {
      'key2' =&gt; \'there',
      'key1' =&gt; 'hello'
  };
  </code></pre>
  
  <p>I want to print out the value at <code>'key2'</code>. Here's what I've tried:</p>
  
  <pre><code>print "$map{key2}" =&gt; SCALAR(0x2398b08)
  print "$$map{key2}" =&gt;
  print "$map-&gt;{key2}" =&gt;
  </code></pre>
  
  <p>my goal:</p>
  
  <pre><code>print [some magic thing] =&gt; there
  </code></pre>
  
  <p>I'm new to perl, so I'm not 100% clear yet on how references behave and how to dereference them.  How do I get what I'm looking for?</p>