Help for this page

Select Code to Download


  1. or download this
     use strict;
     use warnings;
    
  2. or download this
    - my @matrix = ( $n , $n );
    + my @matrix;
    
  3. or download this
    @array = (
      1,      2,       3,       <-- $i = 0
    ...
      |       |        |
      $j = 0  $j = 1   $j = 2
    );
    
  4. or download this
    @array = (
      [ 1,      2,       3       ],  # <-- $i = 0
    ...
        |       |        |
        $j = 0  $j = 1   $j = 2
    );
    
  5. or download this
    @array = ([ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ]);
              ^^^^^^^^^^^  ^^^^^^^^^^^  ^^^^^^^^^^^
    ...
    # <nested_array1> = 1, 2, 3
    # <nested_array2> = 4, 5, 6
    # <nested_array3> = 7, 8, 9
    
  6. or download this
    @array = ( 5, 5 );
    
  7. or download this
    @array = ();
    
  8. or download this
    # $i = 0, $j = 0, $k = 1
    @array = ( [ 1 ] );
    
  9. or download this
    @array = ( [ 1, 2 ] );
    
  10. or download this
    @array = ( [ 1, 2, 3 ] );
    
  11. or download this
    @array = ( [ 1, 2, 3 ], [ 4 ] );