Help for this page
my @matrix; while( <> ) { ... push @matrix, [ split /\s*,\s*/, $_ ]; } # Now @matrix is an array of array references.
my @matrix = map { chomp; [ split /\s*,\s*/, $_ ] } <>;