title: Raku: Trouble Accessing Value of a Multidimensional Hash
body: <p>I am having issues accessing the value of a 2-dimensional hash. From what I can tell online, it should be something like: <code>%myHash{&quot;key1&quot;}{&quot;key2&quot;} #Returns value</code></p>
  <p>However, I am getting the error: &quot;Type Array does not support associative indexing.&quot;</p>
  <p>Here's a <a href="https://stackoverflow.com/help/minimal-reproducible-example">Minimal Reproducible Example</a>.</p>
  <pre><code>my %hash = key1-dim1 =&gt; key1-dim2 =&gt; 42, key2-dim1 =&gt; [42, 42];
  say %hash{'key1-dim1'}{'key1-dim2'}; # 42
  say %hash{'key2-dim1'}{'foo bar'};   # Type Array does not support associative indexing.
  </code></pre>
  <p>Here's another reproducible example, but longer:</p>
  <pre><code>my @tracks = 'Foo Bar', 'Foo Baz';
  my %count;
  for @tracks -&gt; $title {
          $_ = $title;
          my @words = split(/\s/, $_);
          if (@words.elems &gt; 1) {
              my $i = 0;
              while (@words.elems - $i &gt; 1) { 
                  my %wordHash = ();
                  %wordHash.push: (@words[$i + 1] =&gt; 1);
                  %counts.push: (@words[$i] =&gt; %wordHash);
                  say %counts{@words[$i]}{@words[$i+1]}; #===============CRASHES HERE================
                  say %counts.kv;
                  $i = $i + 1;
              }
          }
      }
  </code></pre>
  <p>In my code above, the problem line where the 2-d hash value is accessed will work once in the first iteration of the for-loop. However, it always crashes with that error on the second time through. I've tried replacing the array references in the curly braces with static key values in case something was weird with those, but that did not affect the result. I can't seem to find what exactly is going wrong by searching online.</p>
  <p>I'm very new to raku, so I apologize if it's something that should be obvious.</p>