#!/usr/bin/perl

# [c] piotao, 20070113
# programik generuje macierze o rozmiarze NxM
# uruchom go po prostu z dwiema liczbami, np:
# generuj.pl 5 10
# i gotowe.

use strict;
use warnings;

my $N = $ARGV[0] || 4;
my $M = $ARGV[1] || 4;

map{ map{ print int rand(10), " " } 0 .. $N-1;  print "\n" } 0 .. $M-1;
print "\n";
map{ map{ print int rand(10), " " } 0 .. $M-1;  print "\n" } 0 .. $N-1;