Help for this page

Select Code to Download


  1. or download this
    @matrix = (
        [1, 2, 3],
        [4, 5, 6],
    ...
    ); 
    # Change 6, the element at row  1, column 2 to 100
    $matrix[1][2] = 100;
    
  2. or download this
    $matrix{0}{2} = 100;
    $matrix{1}{0} = 200;
    $matrix{2}{1} = 300;