Root/
| 1 | #!/usr/bin/perl |
| 2 | |
| 3 | $tot = 0; |
| 4 | while (<>) { |
| 5 | next unless /\bT=(.+?)\b/; |
| 6 | $tot++; |
| 7 | $c = $1; |
| 8 | $cat{$c}++; |
| 9 | /^\s*(\S+)\s/; |
| 10 | $man{$c}{$1}++; |
| 11 | } |
| 12 | |
| 13 | print "Total: $tot\n"; |
| 14 | for $c (sort keys %cat) { |
| 15 | print " $c: $cat{$c}\n"; |
| 16 | for $m (sort keys %{ $man{$c} }) { |
| 17 | print "\t$m: $man{$c}{$m}\n"; |
| 18 | } |
| 19 | } |
| 20 |
Branches:
master
