in reply to Re^4: Associated lists to matrices - and accumalted integers
in thread RESOLVED - Associated lists to matrices - and accumalted integers

my @down = keys %matrix; my @across = do {my %s; grep {!$s{$_}++} map {keys %$_} values %matrix +}; my $l = 0; $l < length ($_) and $l = length $_ for @down, @across; print " " x $l; printf " %-${l}s", $_ for @across; print "\n"; foreach my $d (@down) { printf "%-${l}s", $d; printf " %${l}d", $matrix{$d}{$_} || 0 for @across; print "\n"; }