A few things to keep in mind while you learn Perl:
Consider the following "cleaned up" version of your added code:
my @info = sort keys %{$freqs{all}}; my %countop; for my $story1 (@info) { next if $story1 eq 'total'; for my $story2 (@info) { next if $story2 eq 'total'; for my $word (sort keys %freqs) { next unless $freqs{$word}{$story1}; next unless $freqs{$word}{$story2}; $countop{$story1}{$story2}++; } } } for my $m (sort keys %countop) { for my $n (sort keys %{$countop{$m}}) { printf OUT1 "$m, $n, $countop{$m}{$n}\n"; } }
In reply to Re^4: Add colums and rows
by GrandFather
in thread Add colums and rows
by lechateau
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |