title: Perl How to get the index of last element of array reference?
body: <p>If we have array then we can do following:</p>
  
  <pre><code>my @arr = qw(Field3 Field1 Field2 Field5 Field4);
  my $last_arr_index=$#arr;
  </code></pre>
  
  <p>How do we do this for array reference?</p>
  
  <pre><code>my $arr_ref = [qw(Field3 Field1 Field2 Field5 Field4)];
  my $last_aref_index; # how do we do something similar to $#arr;
  </code></pre>