Help for this page

Select Code to Download


  1. or download this
    my @x;
    push @x, [ 0 .. 3 ] for 0 .. 3; # creates a basic 2D array
    my @y = @x;
    $x[0][2] = 'foo';
    print $y[0][2];
    
  2. or download this
    use strict;
    use warnings;
    ...
    @matrix = @temp_matrix;
    print "@matrix\n";
    # prints “Error!: . . . . X . .’, which is what I want