7 die "Not an .lhs file: $f\n" if $f !~ /\.lhs$/;
11 die "Size failed?\n" if $? != 0;
13 if ( $f_size =~ /(\S+)\s*(\S+)\s*(\S+)\s*(\d+)\s*(\S+)/ ) {
16 if ( $f =~ /(.*)\/(.*)/ ) {
19 $DirCount{$dir} += $totsz;
20 $ModCount{$mod} += $totsz;
22 print STDERR "not counted in a directory: $f\n";
23 $ModCount{$f} += $totsz;
26 die "Can't figure out size: $f_size\n";
32 foreach $d (sort (keys %DirCount)) {
33 printf "%-20s %6d\n", $d, $DirCount{$d};
34 $tot += $DirCount{$d};
36 printf "\n%-20s %6d\n\n\n", 'TOTAL:', $tot;
39 foreach $m (sort (keys %ModCount)) {
40 printf "%-20s %6d\n", $m, $ModCount{$m};
41 $tot += $ModCount{$m};
43 printf "\n%-20s %6d\n", 'TOTAL:', $tot;