title: Dereferencing Perl hashrefs
body: <p>Using <a href="http://search.cpan.org/perldoc?Text%3a%3aNgram" rel="noreferrer"><code>Text::Ngram</code></a> I have</p>
  
  <pre><code>my $c = ngram_counts($text, 3);
  my %ct = %($c);
  </code></pre>
  
  <p>which doesn't work (<code>Scalar found where operator expected</code>).  I think this is a combination of not knowing what I'm doing (still not very good with Perl) and being confused about what exactly I'm getting as output from Text::Ngram.  Help?  I just want to look at the generated n-grams:</p>
  
  <pre><code>my @keys = sort {$ct{$a} cmp $ct{$b} } keys %ct;
  foreach my $k (@keys) {
      print "$k: $ct{$k}\n"
  }
  </code></pre>
  
  <p>Edit: Stupid error on my part, thanks everyone.</p>