175

References & Structures
Dereferencing with the Arrow Operator

  • For dereferencing complex lists and hashes the -> operator may be used

  • Each of the following trios is equivalent

      $$listRef[0] = "Ape";
      ${$listRef}[0] = "Ape";
      $listRef->[0] = "Ape";

      $$hashRef{'a'} = "Ape";
      ${$hashRef}{'a'} = "Ape";
      $hashRef->{'a'} = "Ape";