# matrix of random numbers my @matrix; for my $y ( 0..9 ) { my @row = (); for my $x ( 0..9 ) { push @row, 100*rand(); } push @matrix, \@row; }