title: What does "last" do in Perl?
body: <p>In the code below, what does <code>last</code> do in the while loop? I get that if the <code>$matrix[$i][$j]{pointer}</code> variable equals <code>"none"</code> it calls <code>last</code> but what does it do?</p>
  
  <p>Also why does the $matrix variable include score and pointer using curly braces? <code>{score}</code>, I read this as the 3rd dimension in an array, but is this something else? Couldn't find anything on google about this. Thanks!</p>
  
  <pre><code>my @matrix;
  $matrix[0][0]{score}   = 0;
  $matrix[0][0]{pointer} = "none";
  #populate $matrix with more stuff
  
  while (1) {
    last if $matrix[$i][$j]{pointer} eq "none"; #&lt;-what is this "last" doing?
    #do some more stuff here
  }
  </code></pre>