Help for this page

Select Code to Download


  1. or download this
    my @array = [[1,2,3],[4,5,6],[7,8,9]];
    
  2. or download this
    my @array = ([1,2,3],[4,5,6],[7,8,9]); # Note parens.
    # or
    my $aRef = [[1,2,3],[4,5,6],[7,8,9]]; # Note aref, not array
    
  3. or download this
    ${$aRef->[0]}[1]
    # or
    $aRef->[0]->[1]
    # or the most common...
    $aRef->[0][1]